示例#1
0
 private static void CarSpeedWatcher1(object sender, CarSpeedChangedEventArgs e)
 {
     Console.WriteLine($"Watcher 1 reporting current speed: {e.CurrentSpeed}");
 }
示例#2
0
 private static void CarSpeedWatcher2(object sender, CarSpeedChangedEventArgs e)
 {
     Console.WriteLine($"Watcher 2: Car went from {e.PrevSpeed}km/h to {e.CurrentSpeed}km/h");
 }