public TotalMonthlyIncome( ActualGrossSalary actualGrossSalary, TaxableAllowance[] taxableAllowances, NonTaxableAllowance[] nonTaxableAllowances) { Amount = actualGrossSalary.Amount + taxableAllowances.Select(_ => _.Amount).Sum() + nonTaxableAllowances.Select(_ => _.Amount).Sum(); }
public TaxableIncome( ActualGrossSalary actualGrossSalary, TaxableAllowance[] taxableAllowances) { Amount = actualGrossSalary.Amount + taxableAllowances.Select(_ => _.Amount).Sum(); }