title: How to use ManualResetEvent without freezing my UI
body: <p>I want to use <code>ManualResetEvent</code> instead of <code>Thread.Sleep</code> to prevent my UI from freeing.</p>
  
  <p>This is what I have tried:</p>
  
  <pre><code>private ManualResetEvent manualResetEvent = null;
  
  private void Form1_Load(object sender, EventArgs e)
  {
      ManualResetEvent manualResetEvent = new ManualResetEvent(false);
  }
  </code></pre>
  
  <p>And after my operation I want to wait 5 seconds:</p>
  
  <pre><code>manualResetEvent.WaitOne(5000);
  </code></pre>
  
  <p>My problem is that my UI is still freezing ...</p>