protected virtual void OnPizzaReadyToEat(ReadyPizzaEvent x) { EventHandler handler = PizzaReadyToEat; handler?.Invoke(this, x); }
static void c_PizzaIsReadyToEat(object sender, EventArgs x) { ReadyPizzaEvent rpe = (ReadyPizzaEvent)x; Console.WriteLine("Pizza is ready for: " + rpe.CompleteOrder.CustomerName); }