System.Threading.WaitHandle.SafeWaitHandle Property

Gets or sets the native operating system handle.

Syntax

[get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)]
[set: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
public Microsoft.Win32.SafeHandles.SafeWaitHandle SafeWaitHandle { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

When you assign a new value to the WaitHandle.SafeWaitHandle property, the previous handle will be closed when the previous Microsoft.Win32.SafeHandles.SafeWaitHandle object is collected. Do not manually close the handle, because this results in an ObjectDisposedException when the Microsoft.Win32.SafeHandles.SafeWaitHandle attempts to close the handle.

System.Threading.WaitHandle implements the IDisposable.Dispose pattern. See Implementing Finalize and Dispose to Clean Up Unmanaged Resources. When you derive from System.Threading.WaitHandle, use the WaitHandle.SafeWaitHandle property to store your native handle operating system handle. You do not need to override the protected WaitHandle.Dispose(bool) method unless you use additional unmanaged resources.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0