title: Regarding the use of ManualResetEvent usage c#?
body: <p>i am not familiar with the usage of ManualResetEvent ?</p>
  
  <p>is it thread related. what it does and when it is used?</p>
  
  <p>here i got a code where ManualResetEvent is used but i just do not understand what it does?</p>
  
  <p>here is the code</p>
  
  <pre><code>public class Doc : SomeInterfaceFromTheDll
  {
    private readonly IVersion version; // An interface from the DLL.
    private readonly ManualResetEvent _complete = new ManualResetEvent(false);
  
    private bool downloadSuccessful;
  
    // ...
  
    public bool Download()
    {
      this.version.DownloadFile(this);
      // Wait for the event to be signalled...
      _complete.WaitOne();
      return this.downloadSuccessful;
    }
  
    public void Completed(short reason)
    {
      Trace.WriteLine(string.Format("Notify.Completed({0})", reason));
      this.downloadSuccessful = reason == 0;
      // Signal that the download is complete
      _complete.Set();
    }
  
    // ...
  } 
  </code></pre>
  
  <p>what is the meaning of <code>_complete.WaitOne(); &amp; _complete.Set(); ?</code></p>
  
  <p>can anyone give me small sample code where ManualResetEvent class usage will be there.</p>
  
  <p>looking for good discuss and usage of ManualResetEvent ? thanks</p>