protected void OnTimerEvent(TimerEventsArgs e) { TimerEventHandler handler = this.TimerEvent; if (handler != null) { handler(this, e); } }
private static void timer_TimerEvent(object sender, TimerEventsArgs e) { Console.WriteLine("If you want to stop press 'a'"); }