Mega Code Archive

 
Categories / C# Tutorial / Thread
 

Set the main threads 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);      }  } Priority is now: AboveNormal