コード例 #1
0
ファイル: Account.cs プロジェクト: Bvaptsarov/Homework
 protected Account(Customer customer, decimal balance, decimal interestRate)
 {
     if (balance < 0 || interestRate < 0)
     {
         throw new ArgumentOutOfRangeException("Interest rate and balance cannot contain a negative value!");
     }
     else
     {
         Client = customer;
         Balance = balance;
         Interest = interestRate;
     }
 }
コード例 #2
0
ファイル: LoanAccount.cs プロジェクト: Bvaptsarov/Homework
 public LoanAccount(Customer customer, Decimal balance, Decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
コード例 #3
0
ファイル: DepositAccount.cs プロジェクト: Bvaptsarov/Homework
 public DepositAccount(Customer customer, Decimal balance, Decimal withdraw)
     : base(customer, balance, withdraw)
 {
 }