protected void OnTimeElapsed(int counter) { if (TimeElapsed != null) { TimeElapsedEventArgs e = new TimeElapsedEventArgs(counter); TimeElapsed(this, e); } }
public static void TimerPrinting(object sender, TimeElapsedEventArgs e) { Console.WriteLine("I am delegate and print myself at some interval"); }