コード例 #1
0
 public static void Depart(Person sender, TimeArgs e)
 {
     Console.WriteLine("{0} left.", sender.Name);
     greetByUs   -= sender.Greet;
     goodByeByUs -= sender.GoodBye;
     goodByeByUs?.Invoke(sender.Name, e.time);
 }
コード例 #2
0
 public static void Arrive(Person sender, TimeArgs e)
 {
     Console.WriteLine("{0} came at {1} o'clock.", sender.Name, e.time.Hour);
     greetByUs?.Invoke(sender.Name, e.time);
     greetByUs   += sender.Greet;
     goodByeByUs += sender.GoodBye;
 }