Пример #1
0
        private void printer()
        {
            Console.WriteLine("|{0,10}|{1,50}|{2,16}|{3,16}|{4,18}|", "Symbol", "Name", "Number of stocks", "Price per stock", "Total stock value");

            foreach (var s in _portfolio.GetPortfolioStockInformations()) //insert dummy portfolio
            {
                Console.WriteLine("|{0,10}|{1,50}|{2,16}|{3,16:N1}|{4,18:N1}|", s.StockSymbol, s.StockName, s.NumberOfStocks, s.StockValue, s.StockValue * s.NumberOfStocks);
            }

            Console.WriteLine("Total portfolio value: {0:N1}", _portfolio.GetPortfolioValue());
        }