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 . . .
Table of Contents