Ejemplo n.º 1
0
 public bool TransferTo(EasyBankAccount toAccount, float amount)
 {
     if (amount > this.Balance)
     {
         return(false);
     }
     else
     {
         this.Balance -= amount;
         toAccount.ReceiveTransfer(this, amount);
         this.transactionHistory.Add(new TransactionItem()
         {
             Date = DateTime.Now, Description = "Transfer to " + toAccount.ToString(), Amount = -amount, Type = TransactionType.TransferOut
         });
         return(true);
     }
 }