public static void CarAboutToBlow(object sender, CarEventArgs e) { if (sender is Car) { Car c = (Car) sender; Console.WriteLine("{0} says: {1}", c.PetName, e.msg); } }
static void CarIsAlmostDoomed(object sender, CarEventArgs e) { if (sender is Car) { Car c = (Car)sender; Console.WriteLine("=> Critical message from {0}: {1}", c.PetName, e.msg); } else { Console.WriteLine("EEEEEEE"); } }
public virtual void OnAboutToBlow(object sender, CarEventArgs message) { if (this.AboutToBlow != null) { this.AboutToBlow(sender, message); } }
public static void CarExploded(object sender, CarEventArgs e) { Console.WriteLine(e.msg); }
public static void CarIsAlmostDoomed(object sender, CarEventArgs e) { Console.WriteLine("=> Critical Message from Car: {0}", e.msg); }
public static void CarExploded(object sender, CarEventArgs e) { Console.WriteLine("Inside CarExploded()"); Console.WriteLine($"{sender} says: {e.msg}"); }
//public static void CarExploded(string msg) //{ // Console.WriteLine(msg); //} public static void CarExploded(object sender, CarEventArgs e) { Console.WriteLine(e.msg); }
public static void CarExploded(object sender, CarEventArgs e) { Console.WriteLine("{0} says: {1}", sender, e.msg); }
//private static void NewCarOnAboutToBlow(string msgforcaller) //{ // throw new NotImplementedException(); //} private static void NewCarOnAboutToBlow(object sender, CarEventArgs e) { throw new NotImplementedException(); }
public static void CarAboutToBlow(object sender, CarEventArgs e) { Console.WriteLine($" {e.msg} at {e.time}"); }
static void CarAboutToBlow(object sender, CarEventArgs e) { Console.WriteLine("{0} sayy {1}", sender, e.msg); }
public static void CarAboutToBlow(object sender, CarEventArgs e) { Console.WriteLine($"{sender} says: {e.msg}"); }
private static void CarIsAlmostDoomed(object sender, CarEventArgs e) { Console.WriteLine("{0} says:{1}", ((Car)sender).PetName, e.msg); }
public static void CarIsAlmostDoomed(object sender, CarEventArgs e) { Console.WriteLine("=> Critical Message from Car:{1} says {0}", sender, e.msg); }
public virtual void OnExploded(object sender, CarEventArgs message) { if (this.Exploded != null) { this.Exploded(sender, message); } }
//public static void CarIsAlmostDoomed(string msg) //{ // Console.WriteLine("=> Critical Message from Car: {0}", msg); //} public static void CarIsAlmostDoomed(object sender, CarEventArgs e) { Console.WriteLine($"=> Critical Message from Car: {e.msg}"); }
public virtual void OnSlowedDown(object sender, CarEventArgs message) { if (this.SlowedDown != null) { this.SlowedDown(sender, message); } }
public static void CarAboutToBlow(object sender, CarEventArgs e) { Console.WriteLine("{0} says: {1}", sender, e.msg); }