Click or drag to resize

WindowsUtilities.Rename Method

Renames the specified registry key.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static int Rename(
	this RegistryKey key,
	string oldName,
	string newName,
	bool throwOnError = true
)

Parameters

key
Type: Microsoft.Win32.RegistryKey
The registry key.
oldName
Type: System.String
The old name.
newName
Type: System.String
The new name.
throwOnError (Optional)
Type: System.Boolean
true to throw error; otherwise false.

Return Value

Type: Int32
An error or 0 if operation was successful.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type RegistryKey. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionoldName is null or newName is null.
ArgumentExceptionkey has an invalid handle.
See Also