ComponentSpace Registry Toolkit Class Library Reference

RegistryHelper.SetValue Method 

Set the value.

[Visual Basic]
Public Shared Sub SetValue( _
   ByVal keyName As String, _
   ByVal valueName As String, _
   ByVal valueType As UInt32, _
   ByVal valueData As Object _
)
[C#]
public static void SetValue(
   string keyName,
   string valueName,
   uint valueType,
   object valueData
);

Parameters

keyName
The key name.
valueName
The value name.
valueType
The value type.
valueData
The value data.

Remarks

For example, if the key name is HKEY_LOCAL_MACHINE\Software\Test, the value name is Test, the value type is Win32.REG_SZ, and the value is "this is a test" then the string is written to the registry.

Exceptions

Exception Type Condition
RegistryToolkitException Thrown when the registry operation fails.

See Also

RegistryHelper Class | ComponentSpace.RegistryToolkit Namespace