How to Dispose ManualResetEvent
问题 Hi When i use following code: myManualResetEvent.Dispose(); Compiler gives this error: 'System.Threading.WaitHandle.Dispose(bool)' is inaccessible due to its protection level. howevr following line works fine: ((IDisposable)myManualResetEvent).Dispose(); is it the correct way to dispose or at runtime it might crash in some scenerios. Thanks. 回答1: The designers of the .NET Base Class Library decided to implement the Dispose method using explicit interface implementation: private void