C# Program to Print the Priority of Current Thread

You are currently viewing C# Program to Print the Priority of Current Thread

C# program to print the priority of current thread

/*
 *  Program to print the priority of current thread in C#.
 */
using System;
using System.Threading;

class ThreadEx
{
    static void Main()
    {
        Thread Thr = Thread.CurrentThread;
        Thr.Name = "MyThread";

        Console.WriteLine("Information about current thread:");
        Console.WriteLine("\tName of the thread: " +Thr.Name);
        Console.WriteLine("\tPriority of thread: " +Thr.Priority);
    }

}
Information about current thread:
        Name of the thread: MyThread
        Priority of thread: Normal
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply