IVsUserContext.RemoveAttribute(String, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从上下文或子上下文包中删除特性或关键字。
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
中要删除的属性值。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从上下文 .idl:
HRESULT IVsUserContext::RemoveAttribute(
[in] LPCOLESTR szName,
[in] LPCOLESTR szValue
);
调用 IVsUserContext.RemoveAttribute (szName , null) 删除给定特性的所有值; 调用 IVsUserContext.RemoveAttribute (null , null) 从上下文包中移除所有特性。
使用 RemoveAttributeIncludeChildren 方法,还可以从关联的子上下文包或包中删除特性或关键字。