Пример #1
0
        public static void ShowResults(string title, TransactionHistory[] transactions)
        {
            var count = 0;
            ShowHeader(title, transactions.Count());
            foreach (var trans in transactions) {
                Console.WriteLine(
                    "{0} {1} {2} {3} {4}",
                    trans.TransactionId.ToString().PadRight(8),
                    trans.SourceAccountNumber.PadRight(15),
                    trans.TransactionType.PadRight(25),
                    trans.AllocationType.PadRight(5),
                    trans.Amount.ToString("C")
                );

                count += 1;
                if (count > 5) {
                    Console.WriteLine();
                    return;
                }
            }
            Console.WriteLine();
        }