Пример #1
0
 public static void CarAboutToBlow(object sender, CarEventArgs e)
 {
     // Just to be safe, perform a
     // runtime check before casting.
     if (sender is Car)
     {
         Car c = (Car)sender;
         Console.WriteLine("Critical Message from {0}: {1}", c.PetName, e.msg);
     }
 }
Пример #2
0
 public static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says: {1}", sender, e.msg);
 }
Пример #3
0
 public static void CarAboutToBlow(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says: {1}", sender, e.msg);
 }
Пример #4
0
 private static void CarAboutToBlow(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says {1}", sender, e.msg);
 }
Пример #5
0
 public static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine(e.msg);
 }
Пример #6
0
 static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says: {1}", sender, e.msg);
 }
Пример #7
0
        private static void CarAboutToBlow(object sender, CarEventArgs e)
        {
            Car c = (Car)sender;

            Console.WriteLine("=> Critical Message from {0}: {1}", c.PetName, e.msg);
        }
Пример #8
0
 static void CarIsAlmostDoomed(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says: {1}", sender, e.msg);
 }
Пример #9
0
 public static void CarIsAlmostDoomed(object sender, CarEventArgs e)
 {
     Console.WriteLine("=> Critical: {0}", e.msg);
 }
Пример #10
0
 public static void CarAboutToBlow(object sender, CarEventArgs e)
 {
     Console.WriteLine(e.msg);
 }
Пример #11
0
 public static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine(e.msg);
 }