Skip to main content
.NET Framework Class Library
ThreadCurrentThread Property

Gets the currently running thread.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)
Syntax
Public Shared ReadOnly Property CurrentThread As [%$TOPIC/7y89f51w_en-us_VS_110_1_0_0_0_0%]
public static [%$TOPIC/7y89f51w_en-us_VS_110_1_0_1_0_0%] CurrentThread { get; }
public:
static property [%$TOPIC/7y89f51w_en-us_VS_110_1_0_2_0_0%]^ CurrentThread {
	[%$TOPIC/7y89f51w_en-us_VS_110_1_0_2_0_1%]^ get ();
}
static member CurrentThread : [%$TOPIC/7y89f51w_en-us_VS_110_1_0_3_0_0%] with get

Property Value

Type: System.ThreadingThread
A Thread that is the representation of the currently running thread.
Examples

This code example is part of a larger example provided for the IsThreadPoolThread property.

Shared Sub ThreadMethod()
    Console.WriteLine("ThreadOne, executing ThreadMethod, " & _
        "is from the thread pool? {0}", _
        Thread.CurrentThread.IsThreadPoolThread)
End Sub
static void ThreadMethod()
{
    Console.WriteLine("ThreadOne, executing ThreadMethod, " +
        "is {0}from the thread pool.", 
        Thread.CurrentThread.IsThreadPoolThread ? "" : "not ");
}
static void ThreadMethod()
   {
      Console::WriteLine( "ThreadOne, executing ThreadMethod, " 
      "is {0}from the thread pool.", Thread::CurrentThread->IsThreadPoolThread ? (String^)"" : "not " );
   }
Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library
Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.