ComponentSpace Registry Toolkit Class Library Reference

RegistryHelper.RenameKey Method (RegistryKey, String)

Rename the key.

[Visual Basic]
Overloads Public Shared Sub RenameKey( _
   ByVal registryKey As RegistryKey, _
   ByVal newKeyName As String _
)
[C#]
public static void RenameKey(
   RegistryKey registryKey,
   string newKeyName
);

Parameters

registryKey
The key to rename.
newKeyName
The new name.

Remarks

For example, if the new key name is HKEY_LOCAL_MACHINE\Software\Test then the key is renamed HKEY_LOCAL_MACHINE\Software\Test.

Exceptions

Exception Type Condition
RegistryToolkitException Thrown when the registry operation fails.

See Also

RegistryHelper Class | ComponentSpace.RegistryToolkit Namespace | RegistryHelper.RenameKey Overload List