Example #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);
     }
 }
 public static void CarExoloded(Object sendere, CarEventArgs args)
 {
     Console.WriteLine(args.msg);
 }
 public static void CarIsAlmostDoomed(Object sender, CarEventArgs args)
 {
     Console.WriteLine("=> Critical: {0}", args.msg);
 }
 public static void CarAboutToBlow(Object sender, CarEventArgs args)
 {
     Console.WriteLine(args.msg);
 }
Example #5
0
 public static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine(e.msg);
 }
Example #6
0
 public static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine(e.msg);
 }
Example #7
0
 private static void CarAboutToBlow(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says {1}", sender, e.msg);
 }
Example #8
0
 static void CarExploded(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says: {1}", sender, e.msg);
 }
Example #9
0
        private static void CarAboutToBlow(object sender, CarEventArgs e)
        {
            Car c = (Car)sender;

            Console.WriteLine("=> Critical Message from {0}: {1}", c.PetName, e.msg);
        }
Example #10
0
 static void CarIsAlmostDoomed(object sender, CarEventArgs e)
 {
     Console.WriteLine("{0} says: {1}", sender, e.msg);
 }