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
'Déclaration
Function RemoveAttribute ( _
szName As String, _
szValue As String _
) As Integer
'Utilisation
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
)
function RemoveAttribute(
szName : String,
szValue : String
) : int
Parameters
szName
Type: System.String[in] Name of attribute or keyword to be removed.
szValue
Type: System.String[in] Attribute value to remove.
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.