public void Alarm(DateTime time) { ClockEventArgs args = new ClockEventArgs { Time = time }; OnAlarm(this, args); }
static void Alarming(object sender, ClockEventArgs args) { Console.WriteLine("时间到!"); }
public void Alarm(DateTime time) { ClockEventArgs args = new ClockEventArgs { Time = time }; OnAlarm(this, args); }
static void Alarming(object sender, ClockEventArgs args) { Console.WriteLine("时间到!"); }