IVsUserContext::RemoveAttribute Method (String^, String^)

 

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)

int RemoveAttribute(
	String^ szName,
	String^ szValue
)

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.

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.

Return to top
Show: