FacadePattern.FundsCheck.WithdrawMoney C# (CSharp) Méthode

WithdrawMoney() public méthode

public WithdrawMoney ( double cash ) : void
cash double
Résultat void
        public void WithdrawMoney(double cash)
        {
            DecreaseCashInAccount (cash);
            Debug.Log ("Withdraw complete. Current Balance is: " + GetCashInAccount ());
        }

Usage Example

Exemple #1
0
 public void WithdrawCash(double cash)
 {
     if (accChecker.AccountActive(GetAccountNumber()) &&
         codeChecker.IsCodeCorrect(GetSecurityCode()) &&
         fundChecker.HaveEnoughMoney(cash))
     {
         fundChecker.WithdrawMoney(cash);
         Debug.Log("Transaction complete.");
     }
     else
     {
         Debug.Log("Transaction failed.");
     }
 }