ProcessThread.WaitReason 屬性

定義

取得執行緒正在等候的原因。Gets the reason that the thread is waiting.

public:
 property System::Diagnostics::ThreadWaitReason WaitReason { System::Diagnostics::ThreadWaitReason get(); };
public System.Diagnostics.ThreadWaitReason WaitReason { get; }
member this.WaitReason : System.Diagnostics.ThreadWaitReason
Public ReadOnly Property WaitReason As ThreadWaitReason

屬性值

ThreadWaitReason,表示執行緒在等候狀態的原因。A ThreadWaitReason representing the reason that the thread is in the wait state.

例外狀況

執行緒不在等候狀態。The thread is not in the wait state.

處理序位於遠端電腦上。The process is on a remote computer.

備註

只有WaitReason 在為Wait時, 屬性才有效。 ThreadStateThe WaitReason property is valid only when the ThreadState is Wait. 因此, 請先ThreadState檢查值, 然後再WaitReason取得屬性。Therefore, check the ThreadState value before you get the WaitReason property.

適用於

另請參閱