//extension method - a static method that can be invoked as an //instance method of its first this qualified argument type public static double GetIncomeTax(this ITaxPayer that, int age) { double ex = that.GetAnnualIncome() - 120000; float tr = age < 60 ? 0.15f : 0.12f; return(ex > 0 ? tr * ex : 0); }
public Taxpayer(ITaxPayer tp) { TAXPAYER_ID = tp.TAXPAYER_ID; CREATION_DATE = tp.CREATION_DATE; FIRST_NAME = tp.FIRST_NAME; MIDDLE_INITIAL = tp.MIDDLE_INITIAL; LAST_NAME = tp.LAST_NAME; SSN = tp.SSN; }
public Task<AsyncResult> SaveTaxPayer(ITaxPayer taxPayer) { // comment throw new NotImplementedException(); }