IVsStringMap.SetValue(String, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置已命名键的值。
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
中要与键关联的值。
返回
S_OK如果设置了值,则返回。
注解
Null 和空字符串不是有效的键名。 任何 (包含空字符串) 的字符串都是有效的值。 Null 值 GetValue 作为空字符串返回。 如果已存在具有给定键名称的项,则将覆盖它。