Exemplo n.º 1
0
 // Withdraws the amount from an account if the amount is valid.
 public bool Withdraw(Account from, Money amount)
 {
     try
     {
         from.makeWithdraw(amount);
         return(true);
     }
     catch (InvalidOperationException e) {
         return(false);
     }
 }