public void CountDown(int t) { CountDownTimerEventArgs args = new CountDownTimerEventArgs() { Countdowntime = t }; CountDownHandler(this, args); }
static void CountDown1(object sender, CountDownTimerEventArgs args) { while (args.Countdowntime > 0) { Console.WriteLine(args.Countdowntime--); Thread.Sleep(1000); if (args.Countdowntime == 0) { Console.WriteLine("Time is up!"); } } }