public decimal Deposit(decimal amount) { Balance += amount; BankTransaction bankTransaction = new BankTransaction(amount); Transaction.Enqueue(bankTransaction); return(Balance); }
public bool Withdraw(decimal amount) { if (Balance - amount < 0) { return(false); } Balance -= amount; BankTransaction bankTransaction = new BankTransaction(-amount); Transaction.Enqueue(bankTransaction); return(true); }