Exemplo n.º 1
0
 public virtual void Transfer(BankAccountBase destinationAccount, double amount)
 {
     if (amount < 0)
     {
         throw new ArgumentException("Cannot transfer a negative amount");
     }
     _balance -= amount;
     destinationAccount.Deposit(amount);
 }
Exemplo n.º 2
0
 public override void Transfer(BankAccountBase destinationAccount, double amount)
 {
     if (amount < 0)
     {
         throw new ArgumentException("Cannot transfer a negative amount");
     }
     _balance -= amount;
     destinationAccount.Deposit(amount);
     _initialInvestment = _balance;
 }