IVsStringMap.SetValue(String, String) 方法

定义

设置已命名键的值。

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

参数

szKey
String

中要设置的键的名称。

szValue
String

中要与键关联的值。

返回

Int32

S_OK如果设置了值,则返回。

注解

Null 和空字符串不是有效的键名。 任何 (包含空字符串) 的字符串都是有效的值。 Null 值 GetValue 作为空字符串返回。 如果已存在具有给定键名称的项,则将覆盖它。

适用于