Set the main thread's priority : Main Thread : Thread C# Examples


C# Examples » Thread » Main Thread »

 

Set the main thread's priority









    
using  System;  
using  System.Threading;  
  
class  MainClass  {  
    public  static  void  Main()  {  
        Thread  thrd  =  Thread.CurrentThread;  
  
        thrd.Priority  =  ThreadPriority.AboveNormal;  
  
        Console.WriteLine("Priority  is  now:  "  +  thrd.Priority);  

  
    }  
}
    
   
  
   



Output

Priority is now: AboveNormal


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Thread
» Main Thread