Ejemplo n.º 1
0
        private static void Deposit()
        {
            string  number  = ConsoleUtil.CaptureInputString("Enter account number");
            Account account = _bank.FindAccount(number);

            if (account != null)
            {
                double amount     = ConsoleUtil.CaptureInputDouble("Enter amount to deposit");
                double newBalance = account.Deposit(amount);
                Console.WriteLine("Your new balance is {0}", newBalance);
            }
            else
            {
                Console.WriteLine("No account with number {0}", number);
            }
        }