Thread.CurrentThread Property in C# Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a property known as CurrentThread to check the current running thread. Or in other words, the value of this property indicates the current running thread. Syntax: public static Thread CurrentThread { get; } Return Value: This property returns a thread that represent the current running thread. Below programs illustrate the use of CurrentThread property: . Example 1: CSharp // C# program to illustrate the // use of CurrentThread property using System; using System.Threading; class GFG { // Main Method static public void Main() { Thread thr; // Get the reference of main Thread // Using CurrentThread property thr = Thread.CurrentThread; thr.Name = "Main thread"; Console.WriteLine("Name of current running "+ "thread: {0}", thr.Name); } } Output: Name of current running thread: Main thread Example 2: CSharp // C# program to illustrate the // use of CurrentThread property using System; using System.Threading; class GFG { // Display the id of each thread // Using CurrentThread and // ManagedThreadId properties public static void Myjob() { Console.WriteLine("Thread Id: {0}", Thread.CurrentThread.ManagedThreadId); } // Main method static public void Main() { // Creating multiple threads ThreadStart value = new ThreadStart(Myjob); for (int q = 1; q <= 7; ++q) { Thread mythread = new Thread(value); mythread.Start(); } } } Output: Thread Id: 3 Thread Id: 8 Thread Id: 9 Thread Id: 6 Thread Id: 5 Thread Id: 7 Thread Id: 4 Reference: https://learn.microsoft.com/en-us/dotnet/api/system.threading.thread.currentthread?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article Thread.ResetAbort Method in C# A ankita_saini Follow Improve Article Tags : C# CSharp Multithreading CSharp Thread Class Similar Reads C# Thread Priority in Multithreading In a multithreaded environment, each thread has a priority that determines how frequently the thread is allocated CPU resources by the operating system. The Thread.Priority property in C# is used to set or get the priority of a thread.A programmer can explicitly assign a priority to a thread using t 3 min read C# | Thread(ParameterizedThreadStart) Constructor Thread(ParameterizedThreadStart) Constructor is used to initialize a new instance of the Thread class. It defined a delegate which allows an object to pass to the thread when the thread starts. This constructor gives ArgumentNullException if the parameter of this constructor is null. Syntax: public 2 min read How to Create Threads in C#? Multithreading enables concurrent task execution in C#. It improves performance and responsiveness. We can create threads using the System.Threading namespace. With the help of Threads, we can achieve multitasking and can define their behavior using different methods provided by the Thread Class. Ex 6 min read Thread.ResetAbort Method in C# A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a method known as ResetAbort which is responsible for canceling the abort request of the current thread. It prevents the ThreadAbortException from terminating the thread. Syntax: public static v 2 min read Naming a thread and fetching name of current thread in C# A thread is a light-weight process within a process. In C#, a user is allowed to assign a name to the thread and also find the name of the current working thread by using the Thread.Name property of the Thread class. Syntax : public string Name { get; set; } Here, the string contains the name of the 2 min read Stack.IsSynchronized Property in C# This method(comes under System.Collections namespace) is used to get a value indicating whether access to the Stack is synchronized (thread safe) or not. To guarantee the thread safety of the Stack, all operations must be done through the wrapper returned by the Synchronized method. Also, retrieving 2 min read Like