Thread method with no parameter : Thread Creation : Thread C# Examples


C# Examples » Thread » Thread Creation »

 

Thread method with no parameter









    
using  System;
using  System.Collections.Generic;
using  System.Diagnostics;
using  System.IO;
using  System.Reflection;
using  System.Runtime;
using  System.Runtime.CompilerServices;
using  System.Security;
using  System.Text;

public  class  MainClass
{
        public  static  void  Main()
        {
                Thread  thread  =  new  Thread(WorkerOperation);
                thread.Start();

                thread.Join();
        }
        private  static  void  WorkerOperation()
        {
                Console.WriteLine("Simple  worker");
        }
}
    
   
  
   



Output

Simple worker


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Thread
» Thread Creation