Exemple #1
0
 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);
     }
 }
Exemple #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);
 }