Creating Threads : Thread Creation : Thread C# Source Code


Custom Search

C# Source Code » Thread » Thread Creation »

 

Creating Threads








    

/*
 * C# Programmers Pocket Consultant
 * Author: Gregory S. MacBeth
 * Email: gmacbeth@comporium.net
 * Create Date: June 27, 2003
 * Last Modified Date:
 * Version: 1
 */
using System;
using System.Threading;

namespace Client.Chapter_15___Threading
{
  public class CreatingThreads
  {
    static void Main(string[] args)
    {
      Thread MyNewThread = new Thread(new ThreadStart(ThreadProc));

      MyNewThread.Start();
      MyNewThread.Join();
    }
    protected static void ThreadProc()
    {
      for (int i = 0; i < 100; i++)
      {
        Console.WriteLine(i);
      }
    }
  }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Thread
» Thread Creation