public void Monitor(object sender, StockChangeEventArgs e) { if (e.Stock.Symbol == "GOOG") { Console.WriteLine("Google's has reached the target price: {0}", e.Stock.Price); } }
public void Monitor(object sender, StockChangeEventArgs e) { if (e.Stock.Symbol == "MSFT" && e.Stock.Price > 10.00m) { Console.WriteLine("Microsoft has reached the target price: {0}", e.Stock.Price); } }