ProcessThread::WaitReason Property
.NET Framework (current version)
Gets the reason that the thread is waiting.
Assembly: System (in System.dll)
Property Value
Type: System.Diagnostics::ThreadWaitReasonA ThreadWaitReason representing the reason that the thread is in the wait state.
| Exception | Condition |
|---|---|
| InvalidOperationException | The thread is not in the wait state. |
| PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
| NotSupportedException | The process is on a remote computer. |
The WaitReason property is valid only when the ThreadState is Wait. Therefore, check the ThreadState value before you get the WaitReason property.
.NET Framework
Available since 1.1
Available since 1.1
Show: