class Program { static void Main(string[] args) { ThreadPool.QueueUserWorkItem(ThreadProc); Console.WriteLine("Main thread does some work, then sleeps."); Thread.Sleep(5000); Console.WriteLine("Main thread exists."); Console.ReadLine(); } static void ThreadProc(object a) { Console.WriteLine("Hello from the thread pool."); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)