Пример #1
0
 // Deposits the amount in to an account if the amount is valid.
 public bool Deposit(Account to, Money amount)
 {
     try
     {
         to.makeDeposit(amount);
         return(true);
     }
     catch (InvalidOperationException e)
     {
         return(false);
     }
 }