public void TransferTo(double amount, BankAccount3 another) { 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); } }
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); }