ThreadState Property

ProcessThread.ThreadState Property

 

Gets the current state of this thread.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

public ThreadState ThreadState { get; }

Property Value

Type: System.Diagnostics.ThreadState

A ThreadState that indicates the thread's execution, for example, running, waiting, or terminated.

Exception Condition
PlatformNotSupportedException

The platform is Windows 98 or Windows Millennium Edition.

NotSupportedException

The process is on a remote computer.

The WaitReason property value is valid only when the ThreadState value is Wait. Therefore, check the ThreadState value before you get the WaitReason property.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft