private void Alarm(object sender, AlarmEventArgs e) { Console.WriteLine("叮叮叮...闹钟响了。"); ShowTime(); }
//6. 事件处理方法 static void ShowTimeArrival(object sender, AlarmEventArgs e) { Console.WriteLine("Time is up, come on, you should do what you should do!"); }