다음을 통해 공유


IVsStringMap.SetValue Method

Sets the value of a named key.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
  Microsoft.VisualStudio (in Microsoft.VisualStudio.dll)

Syntax

'Declaration
Function SetValue ( _
    szKey As String, _
    szValue As String _
) As Integer
int SetValue(
    string szKey,
    string szValue
)
int SetValue(
    [InAttribute] String^ szKey, 
    [InAttribute] String^ szValue
)
abstract SetValue : 
        szKey:string * 
        szValue:string -> int
function SetValue(
    szKey : String, 
    szValue : String
) : int

Parameters

  • szKey
    Type: String

    [in] The name of the key to set.

  • szValue
    Type: String

    [in] The value to associate with the key.

Return Value

Type: Int32
Returns S_OK if the value was set.

Remarks

Null and empty strings are not valid key names. Any string (including a null string) is a valid value. Null values are returned from GetValue as empty strings. If an entry with the given key name already exists, it will be overwritten.

.NET Framework Security

See Also

Reference

IVsStringMap Interface

Microsoft.VisualStudio.Shell.Interop Namespace