RegistryKey::DeleteValue Method (String^)
.NET Framework (current version)
Deletes the specified value from this key.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- name
-
Type:
System::String^
The name of the value to delete.
| Exception | Condition |
|---|---|
| ArgumentException | name is not a valid reference to a value. |
| SecurityException | The user does not have the permissions required to delete the value. |
| ObjectDisposedException | The RegistryKey being manipulated is closed (closed keys cannot be accessed). |
| UnauthorizedAccessException | The RegistryKey being manipulated is read-only. |
On Windows 95, Windows 98, Windows 98 Second Edition, and Windows Millennium Edition, specifying an empty string for the name parameter does not delete the default value.
This code example is part of a larger example provided for the RegistryKey class.
RegistryPermission
for the ability to delete the specified registry key. Associated enumerations: RegistryPermissionAccess::Write
.NET Framework
Available since 1.1
Available since 1.1
Show: