Export (0) Print
Expand All

RegistryKey.Handle Property

.NET Framework 4.6 and 4.5

Gets a SafeRegistryHandle object that represents the registry key that the current RegistryKey object encapsulates.

Namespace:  Microsoft.Win32
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(false)]
public SafeRegistryHandle Handle { get; }

Property Value

Type: Microsoft.Win32.SafeHandles.SafeRegistryHandle
The handle to the registry key.

ExceptionCondition
ObjectDisposedException

The registry key is closed. Closed keys cannot be accessed.

UnauthorizedAccessException

The user does not have the necessary registry rights.

IOException

A system error occurred, such as deletion of the current key.

SecurityException

The user does not have the permissions required to read the key.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft