# How to get the thread ID from a thread in C#?

CsharpServer Side ProgrammingProgramming

A thread is defined as the execution path of a program. Each thread defines a unique flow of control. If your application involves complicated and time-consuming operations, then it is often helpful to set different execution paths or threads, with each thread performing a particular job.

Threads are lightweight processes. One common example of use of thread is implementation of concurrent programming by modern operating systems. Use of threads saves wastage of CPU cycle and increase efficiency of an application.

## Example

class Program{
public static void Main(){
}
Name of current running thread: Main thread
Id of current running thread: 1