共用方式為


WaitHandle.Handle 屬性

定義

警告

Use the SafeWaitHandle property instead.

警告

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

取得或設定原生 (Native) 的作業系統控制代碼。

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 可能會導致控制碼外泄。

適用於