Compartir a través de


IVsUserContext.RemoveAttribute Method

Removes an attribute or keyword from a context or subcontext bag.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaración
Function RemoveAttribute ( _
    szName As String, _
    szValue As String _
) As Integer
'Uso
Dim instance As IVsUserContext
Dim szName As String
Dim szValue As String
Dim returnValue As Integer

returnValue = instance.RemoveAttribute(szName, _
    szValue)
int RemoveAttribute(
    string szName,
    string szValue
)
int RemoveAttribute(
    [InAttribute] String^ szName, 
    [InAttribute] String^ szValue
)
abstract RemoveAttribute : 
        szName:string * 
        szValue:string -> int 
function RemoveAttribute(
    szName : String, 
    szValue : String
) : int

Parameters

  • szName
    Type: System.String
    [in] Name of attribute or keyword to be removed.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From context.idl:

HRESULT IVsUserContext::RemoveAttribute(
   [in] LPCOLESTR szName,
   [in] LPCOLESTR szValue
);

Calling IVsUserContext.RemoveAttribute(szName, nulla null reference (Nothing in Visual Basic)) removes all values for a given attribute; calling IVsUserContext.RemoveAttribute(nulla null reference (Nothing in Visual Basic), nulla null reference (Nothing in Visual Basic)) removes all attributes from the context bag.

Use the RemoveAttributeIncludeChildren method to additionally remove attributes or keywords from associated the subcontext bag or bags.

.NET Framework Security

See Also

Reference

IVsUserContext Interface

IVsUserContext Members

Microsoft.VisualStudio.Shell.Interop Namespace