public void Dispose() { if (_Timer != null) { _Timer.Dispose(); } }
void IDisposable.Dispose() { if (Interlocked.CompareExchange(ref _d, 1, 0) == 0) { try { _timer.Stop(); _timer.Dispose(); } catch (Exception ex) { System.Console.Error.WriteLine(ex); } } }