WaitHandle.Handle 属性

定义

注意

Use the SafeWaitHandle property instead.

注意

WaitHandle.Handle has been deprecated. Use the SafeWaitHandle property instead.

获取或设置本机操作系统句柄。

public:
 virtual property IntPtr Handle { IntPtr get(); void set(IntPtr value); };
[System.Obsolete("Use the SafeWaitHandle property instead.")]
public virtual IntPtr Handle { get; set; }
[System.Obsolete("WaitHandle.Handle has been deprecated. Use the SafeWaitHandle property instead.")]
public virtual IntPtr Handle { get; set; }
[System.Obsolete("Use the SafeWaitHandle property instead.")]
public virtual IntPtr Handle { get; [System.Security.SecurityCritical] set; }
public virtual IntPtr Handle { get; set; }
[<System.Obsolete("Use the SafeWaitHandle property instead.")>]
member this.Handle : nativeint with get, set
[<System.Obsolete("WaitHandle.Handle has been deprecated. Use the SafeWaitHandle property instead.")>]
member this.Handle : nativeint with get, set
[<System.Obsolete("Use the SafeWaitHandle property instead.")>]
[<set: System.Security.SecurityCritical>]
member this.Handle : nativeint with get, set
member this.Handle : nativeint with get, set
Public Overridable Property Handle As IntPtr

属性值

IntPtr

nativeint

IntPtr,它表示本机操作系统句柄。 默认为 InvalidHandle 字段的值。

属性

注解

将新值分配给 Handle 属性不会关闭以前的句柄。 这可能会导致句柄泄漏。

请勿在 .NET Framework 2.0 或更高版本中使用此属性;请改用 SafeWaitHandle 属性。 将此属性设置为有效的句柄也会设置属性 SafeWaitHandle ,但将其设置为 InvalidHandle 可能会导致句柄泄漏。

适用于