title: How to use wait handles in C# threading?
body: <p>I have three threads in my program and I want that when thread one finishes it signals thread 2 to start and when thread 2 finishes it should signal thread 3 to start.</p>
  
  <p>How can I achieve this, I know there are wait handles to do that in C#, but I don't know how to use them ?</p>
  
  <p>Following is the code of my program:</p>
  
  <pre><code>class Program
      {
          static void Main(string[] args)
          {
              Thread t1 = new Thread(Task1);
              Thread t2 = new Thread(Task2);
              Thread t3 = new Thread(Task3);
  
              t1.Start();
              t2.Start();
              t3.Start();
  
              Console.Read();
          }
  
          public static void Task1()
          {
              Console.WriteLine("I am assigned task 1:");
              for (int i = 0; i &lt; 50; i++)
              {
                  Console.WriteLine("Task1" );
              }
          }
          public static void Task2()
          {
              Console.WriteLine("I am assigned task 2:");
              for (int i = 0; i &lt; 50; i++)
              {
                  Console.WriteLine("Task2");
              }
          }
          public static void Task3()
          {
              Console.WriteLine("I am assigned task 3:");
              for (int i = 0; i &lt; 50; i++)
              {
                  Console.WriteLine("Task3");
              }
          }
      }
  </code></pre>