protected virtual void OnPriceChange(PriceChangedEventArgs e) { if (priceChange == null) { return; } priceChange(this, e); }
static void iphone6_PriceChanged(object sender, PriceChangedEventArgs e) { Console.WriteLine("年终大促销,iPhone 6 只卖 " + e.NewPrice + " 元, 原价 " + e.OldPrice + " 元,快来抢!"); }