System.Threading.WaitHandle (and hence ManualResetEvent etc) implement IDisposable explicitly. This seems to discourage it’s use (calling Close() achieves the same as casting to IDisposable and calling Dispose).
I’m just wondering if there is a good reason for this?
There’s awkwardness in the .NET APIs induced by Dispose(). Other examples of classes that have both a Close and a Dispose method are the Stream derived classes, Socket, TcpClient, EventLog, Process, SqlConnection and many others.
I don’t know any example of such a class that doesn’t simply call Dispose() in its Close() method implementation. In other words, you’re always fine using the “using” statement and not calling Close. The API designers however preferred keeping Close() around as a more literal way of ending the use of the object. That’s defensible, the Dispose() method tends to be inherited from a base class, often a very obscure one.