Timer.Dispose Method (WaitHandle)
Releases all resources used by the current instance of Timer and signals when the timer has been disposed of.
Assembly: mscorlib (in mscorlib.dll)
When this method completes, it signals the WaitHandle specified by the notifyObject parameter. Use this overload of the Dispose method if you want to be able to block until you are certain that the timer has been disposed. The timer is not disposed until all currently queued callbacks have completed.
If the callback uses the Change method to set the dueTime parameter to zero, a race condition can occur when the method overload is called: If the timer queues a new callback before the method overload detects that there are no callbacks queued, continues to block; otherwise, the timer is disposed while the new callback is being queued, and an ObjectDisposedException is thrown when the new callback calls the Change method.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.