Creating Threads - CSharp Thread Asynchronous

CSharp examples for Thread Asynchronous:Thread

Description

Creating Threads

Demo Code

using System;//from w  w w  .  ja  v  a 2s  .c o  m
using System.Threading;
class ThreadCreationProgram {
   public static void CallToChildThread() {
      Console.WriteLine("Child thread starts");
   }
   static void Main(string[] args) {
      ThreadStart childref = new ThreadStart(CallToChildThread);
      Console.WriteLine("In Main: Creating the Child thread");
      Thread childThread = new Thread(childref);
      childThread.Start();
   }
}

Result


Related Tutorials