How to

get thread state

Published: 3. November 2011 | Updated: 3. November 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Threading
Tags: C# Threading
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.Threading;

Code

Thread thread = Thread.CurrentThread;
ThreadState state = thread.ThreadState;

Console.WriteLine(state);
Console Output:
Running
Send us feedback about this snippet »



Related Snippets: