AbandonedMutexException.Mutex 屬性

定義

取得造成例外狀況的已放棄 Mutex (若為已知)。

public:
 property System::Threading::Mutex ^ Mutex { System::Threading::Mutex ^ get(); };
public System.Threading.Mutex Mutex { get; }
public System.Threading.Mutex? Mutex { get; }
member this.Mutex : System.Threading.Mutex
Public ReadOnly Property Mutex As Mutex

屬性值

Mutex

Mutex 物件,表示已放棄的 Mutex;若無法識別已放棄的 Mutex,則為 null

備註

如果在呼叫 WaitHandle.WaitAny 方法時擲回例外狀況,則傳回的 Mutex 是已放棄的 Mutex,且傳遞至 WaitAny 的物件陣列 WaitHandle 中索引最低,或者 null 如果無法識別已放棄的 Mutex,則為 。 如果在 呼叫 WaitOneWaitAll 時擲回例外狀況,這個屬性一律會傳 null 回 。

適用於

另請參閱