title: How do I extend a WinForm's Dispose method?
body: <p>I am getting this warning from FxCop:</p>
  
  <blockquote>
    <p>"'RestartForm' contains field 'RestartForm.done' that is of IDisposable type: 'ManualResetEvent'. Change the Dispose method on 'RestartForm' to call Dispose or Close on this field."</p>
  </blockquote>
  
  <p>Ok, I understand what this means and why this is what needs to be done... Except <code>System.Windows.Forms.Form</code> doesn't allow you to override either <code>.Close()</code> or <code>.Dispose()</code>, so what to do? Currently I'm running with this solution:</p>
  
  <pre><code>    private void RestartForm_FormClosing(object sender, FormClosingEventArgs e)
      {
          done.Set();
          done.Close();
      }
  </code></pre>
  
  <p>Which works as intended for my application... But FxCop still shows this message. Am I covered and can I safely ignore it, or is there another way I should be doing this?</p>