void IAccount.TransferMoney(double money, IAccount recepient) { if (money > _Money) { throw new NotEnoughMoneyException(); } recepient.AddMoney(money); _Money -= money; }
void IAccount.TransferMoney(double money, IAccount recepient) { if (_Money - (money + money * CreditComission / 100) < CreditLimit) { throw new CreditLimitException(); } recepient.AddMoney(money); if (_Money < 0) { _Money -= money * CreditComission / 100; } _Money -= money; }
void IAccount.TransferMoney(double money, IAccount recepient) { if (money < _Money) { throw new NotEnoughMoneyException(); } if (DateTime.Now < DepositTime) { throw new NotTimeSonException(); } recepient.AddMoney(money); _Money -= money; }