IVsUserContext.RemoveAttribute(String, String) 方法

定义

从上下文或子上下文包中删除特性或关键字。

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

参数

szName
String

中要删除的属性或关键字的名称。

szValue
String

中要删除的属性值。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从上下文 .idl:

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

调用 IVsUserContext.RemoveAttribute (szNamenull) 删除给定特性的所有值; 调用 IVsUserContext.RemoveAttribute (nullnull) 从上下文包中移除所有特性。

使用 RemoveAttributeIncludeChildren 方法,还可以从关联的子上下文包或包中删除特性或关键字。

适用于