Using the thread pool and no arguments : ThreadPool : Thread C# Examples


C# Examples » Thread » ThreadPool »

 

Using the thread pool and no arguments









    
using  System;
using  System.Threading;

class  MainClass
{
        public  static  void  DisplayMessage(object  state)
        {
                string  config  =  state  as  string;

                Console.WriteLine(config);

                Thread.Sleep(1000);
        }

        public  static  void  Main()
        {
                ThreadPool.QueueUserWorkItem(DisplayMessage);
        }
}
    
   
  
   



Output

info


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Thread
» ThreadPool