Пример #1
0
 private static void CheckFilter(Stock value)
 {
     if (value.Symbol == "GOOG")
     {
         Console.WriteLine("Google's new price is: {0}", value.Price);
     }
 }
Пример #2
0
 private static void CheckFilter(Stock value)
 {
     if (value.Symbol == "MSFT" && value.Price > 10.00m)
     {
         Console.WriteLine("Microsoft has reached the target price: {0}", value.Price);
     }
 }
Пример #3
0
        public static IEnumerable<Stock> GetNext()
        {
            for (int i = 0; i < _samplePrices.Length; i++)
            {
                Stock s = new Stock();

                s.Symbol = _sampleStocks[i];
                s.Price = _samplePrices[i];

                yield return s;
            }
        }
 public StockChangeEventArgs(Stock s)
 {
     Stock = s;
 }