Create the Worker Thread - CSharp Thread Asynchronous

CSharp examples for Thread Asynchronous:Thread

Description

Create the Worker Thread

Demo Code

using System;// w ww  . j av  a2s.  c o m
using System.Threading;
class Class1
{
   static void WorkerThread( )
   {
      Console.WriteLine("Hello from WorkerThread");
   }
   static void Main(string[] args)   {
      System.Threading.Thread WT = new Thread( new ThreadStart( WorkerThread ) );
      //Start the Thread
      WT.Start( );
      //end the application
      Console.WriteLine("Press enter to exit");
      Console.ReadLine( );
   }
}

Result


Related Tutorials