Recursively deletes a subkey and any child subkeys. The string subKey is not case sensitive.
[Visual Basic] Public Sub DeleteSubKeyTree( _ ByVal subkey As String _ ) [C#] public void DeleteSubKeyTree( string subkey ); [C++] public: void DeleteSubKeyTree( String* subkey ); [JScript] public function DeleteSubKeyTree( subkey : String );
Exception Type | Condition |
---|---|
InvalidArgumentException | if deletion of a root hive is attempted. |
ArgumentException | if subkey does not match a valid registry subkey. |
ArgumentNullException | if subkey is null. |
SecurityException | if user does not have RegistryPermission.SetInclude(delete, currentKey) access. |
RegistryKey Class | RegistryKey Members | Microsoft.Win32 Namespace