RegistrationAttribute.Key.SetValue Method

Adds a value to the current registration Key.

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

Syntax

声明
Public MustOverride Sub SetValue ( _
    valueName As String, _
    value As Object _
)
用法
Dim instance As RegistrationAttribute..::..Key
Dim valueName As String
Dim value As Object

instance.SetValue(valueName, value)
public abstract void SetValue(
    string valueName,
    Object value
)
public:
virtual void SetValue(
    String^ valueName, 
    Object^ value
) abstract
abstract SetValue : 
        valueName:string * 
        value:Object -> unit 
public abstract function SetValue(
    valueName : String, 
    value : Object
)

Parameters

  • valueName
    Type: System.String
    The name of the value to set. If valueName is null or an empty string, SetValue sets the default value for the current Key.
  • value
    Type: System.Object
    An object to store in the value. The object cannot be null. If the object is a numeric type that can be converted to an integer, it is stored as a DWORD registry encoding. Otherwise it is stored as a string.

Remarks

This method is typically called from within the Register method of a class derived from RegistrationAttribute.

.NET Framework Security

See Also

Reference

RegistrationAttribute.Key Class

RegistrationAttribute.Key Members

Microsoft.VisualStudio.Shell Namespace

RegistrationAttribute.Key