How do I extend a WinForm's Dispose method?
问题 I am getting this warning from FxCop: "'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." Ok, I understand what this means and why this is what needs to be done... Except System.Windows.Forms.Form doesn't allow you to override either .Close() or .Dispose() , so what to do? Currently I'm running with this solution: private void RestartForm_FormClosing(object sender,