Example #1
0
        public void TransferTo(double amount, BankAccount3 another)
        {
            this.Withdraw(amount);
            another.Deposit(amount);

            /*
             * if (amount > balance)
             * {
             *  Console.WriteLine("Cannot transfer the amount greater than balance");
             * }
             * else
             * {
             *  balance = balance - amount;
             *  another.Deposit(amount);
             *  Console.WriteLine("Transfer ${0} dollars to {1}'account:{2}", amount, another.AccountHolderName, another.AccountNumber);
             * }
             */
        }
Example #2
0
 public new void TransferTo(double amount, BankAccount3 another)
 {
     balance = balance - amount;
     another.Deposit(amount);
     Console.WriteLine("Transfer ${0} dollars to {1}'account:{2}", amount, another.AccountHolderName, another.AccountNumber);
 }