WaitHandle.Handle 屬性
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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); };
C#
[System.Obsolete("Use the SafeWaitHandle property instead.")]
public virtual IntPtr Handle { get; set; }
C#
[System.Obsolete("WaitHandle.Handle has been deprecated. Use the SafeWaitHandle property instead.")]
public virtual IntPtr Handle { get; set; }
C#
[System.Obsolete("Use the SafeWaitHandle property instead.")]
public virtual IntPtr Handle { get; [System.Security.SecurityCritical] set; }
C#
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 可能會導致控制碼外泄。
產品 | 版本 (已過時) |
---|---|
.NET | (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9) |
.NET Framework | 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1) |
.NET Standard | (2.0, 2.1) |