Use AutoResetEvent : AutoResetEvent : Thread C# Source Code


Custom Search

C# Source Code » Thread » AutoResetEvent »

 

Use AutoResetEvent








    

using System;
using System.Threading;

// AutoReset
class Auto {
    [STAThread]
    static void Main() {
        AutoResetEvent aRE = new AutoResetEvent(true);
        bool state = aRE.WaitOne(1000, true);
        Console.WriteLine("After First WaitOne " + state);
        state = aRE.WaitOne(5000, true);
        Console.WriteLine("After Second WaitOne " + state);
    }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Thread
» AutoResetEvent