static void AlarmLisener2(object sender, EventAlarmArg e)
 {
     Console.WriteLine("Alarm lisener 2");
     Console.WriteLine($"Alarm lisener 1{ sender.ToString()} { e.ToString() }");
 }
示例#2
0
 static void AlarmLisener1(object sender, EventAlarmArg e)
 {
     Console.WriteLine("Alarm lisener 1");
     Console.WriteLine($"Alarm lisener 1{ e.Location.ToString() }");
     throw new Exception("Bang");
 }