IVsUserContext.RemoveAttribute(String, String) Method

Definition

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

public:
 int RemoveAttribute(System::String ^ szName, System::String ^ szValue);
public:
 int RemoveAttribute(Platform::String ^ szName, Platform::String ^ szValue);
int RemoveAttribute(std::wstring const & szName, std::wstring const & szValue);
public int RemoveAttribute (string szName, string szValue);
abstract member RemoveAttribute : string * string -> int
Public Function RemoveAttribute (szName As String, szValue As String) As Integer

Parameters

szName
String

[in] Name of attribute or keyword to be removed.

szValue
String

[in] Attribute value to remove.

Returns

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, null) removes all values for a given attribute; calling IVsUserContext.RemoveAttribute(null, null) removes all attributes from the context bag.

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

Applies to