NOTE: This API is now obsolete. The non-obsolete alternative is SafeWaitHandle.
Gets or sets the native operating system handle.
<ObsoleteAttribute("Use the SafeWaitHandle property instead.")> _ Public Overridable Property Handle As IntPtr
Dim instance As WaitHandle Dim value As IntPtr value = instance.Handle instance.Handle = value
[ObsoleteAttribute("Use the SafeWaitHandle property instead.")] public virtual IntPtr Handle { get; set; }
[ObsoleteAttribute(L"Use the SafeWaitHandle property instead.")] public: virtual property IntPtr Handle { IntPtr get (); void set (IntPtr value); }
public function get Handle () : IntPtr public function set Handle (value : IntPtr)
Assigning a new value to the Handle property does not close the previous handle. This can result in a leaked handle.
Do not use this property in the .NET Framework version 2.0 or later; use the SafeWaitHandle property instead. Setting this property to a valid handle also sets the SafeWaitHandle property, but setting it to InvalidHandle can result in a leaked handle.
for access to unmanaged code. Associated enumeration: SecurityPermissionFlag..::.UnmanagedCode. Security action: LinkDemand.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune