Ejemplo n.º 1
0
        static Stock GetStockDetails()
        {
            Random rnd = new Random();

            Stock stock = new Stock();

            stock.Name = GetStockName();
            stock.Price = rnd.Next(1, 999) + rnd.NextDouble();

            return stock;
        }
Ejemplo n.º 2
0
 public void SendStockDetail(Stock stock)
 {
     Console.WriteLine("Stock Name: {0}, Price: ${1:000.00}", stock.Name, stock.Price);
 }