WaitHandleExtensions.GetSafeWaitHandle Method (WaitHandle)

.NET Framework (current version)
 

Gets the safe handle for a native operating system wait handle.

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

[SecurityCriticalAttribute]
public static SafeWaitHandle GetSafeWaitHandle(
	this WaitHandle waitHandle
)

Parameters

waitHandle
Type: System.Threading.WaitHandle

A native operating system handle.

Return Value

Type: Microsoft.Win32.SafeHandles.SafeWaitHandle

The safe wait handle that wraps the native operating system wait handle.

Exception Condition
ArgumentNullException

waitHandle is null.

GetSafeWaitHandle is an extension method that is equivalent to retrieving the value of the WaitHandle.SafeWaitHandle property.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.6
Return to top
Show: