static Stock GetStockDetails() { Random rnd = new Random(); Stock stock = new Stock(); stock.Name = GetStockName(); stock.Price = rnd.Next(1, 999) + rnd.NextDouble(); return stock; }
public void SendStockDetail(Stock stock) { Console.WriteLine("Stock Name: {0}, Price: ${1:000.00}", stock.Name, stock.Price); }