コード例 #1
0
        public void Withdraw(decimal amountToWithdraw)
        {
            GuardNoNegatives(amountToWithdraw);

            if (amountToWithdraw > _balance)
            {
                throw new OverdraftException();
            }
            _fedNotifier.NotifyOfWithdrawal(this, amountToWithdraw);
            _balance -= amountToWithdraw;
        }