Beispiel #1
0
 public virtual void RaisePriceChangedEvent(PriceChangedEventArgs e)
 {
     if (PriceChangedEvent != null)
     {
         PriceChangedEvent(this, e);
     }
 }
 static void stock_PriceChangedEvent(object sender, PriceChangedEventArgs e)
 {
     if ((e.NewPrice - e.LastPrice) / e.LastPrice > 0.1M)
     {
         Console.WriteLine("Alert, 10% stock price increase!");
     }
 }