Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WaitHandle.SafeWaitHandle Property

Gets or sets the native operating system handle.

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)

public SafeWaitHandle SafeWaitHandle { get; set; }
/** @property */
public SafeWaitHandle get_SafeWaitHandle ()

/** @property */
public void set_SafeWaitHandle (SafeWaitHandle value)

public function get SafeWaitHandle () : SafeWaitHandle

public function set SafeWaitHandle (value : SafeWaitHandle)

Not applicable.

Property Value

A SafeWaitHandle representing the native operating system handle.

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

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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

Show:
© 2015 Microsoft