get/set thread priority
Published: 3. November 2011 | Updated: 3. November 2011License: Microsoft Public License (MS-PL)
Categories: Framework » Threading
Tags: C# Threading
Import namespace
using System.Threading;
Code
Thread thread = Thread.CurrentThread; // set thread.Priority = ThreadPriority.Highest; // get ThreadPriority priority = thread.Priority; Console.WriteLine(priority);Console Output:
Highest
| Send us feedback about this snippet » |





