// this list could be dynamically loaded from a file // then load it from a list created using the file private IncomeTaxRates() { // we use variables here to be able to debug // latter we can change to directly add the new values to the set IncomeTaxRate incomeTaxRate1 = new IncomeTaxRate(0, 18200, 0, 0.00M); IncomeTaxRate incomeTaxRate2 = new IncomeTaxRate(18201, 37000, 0, 0.19M); IncomeTaxRate incomeTaxRate3 = new IncomeTaxRate(37001, 80000, 3572, 0.325M); IncomeTaxRate incomeTaxRate4 = new IncomeTaxRate(80001, 180000, 17547, 0.37M); IncomeTaxRate incomeTaxRate5 = new IncomeTaxRate(180001, 100000000, 54547, 0.45M); addRate(incomeTaxRate1); addRate(incomeTaxRate2); addRate(incomeTaxRate3); addRate(incomeTaxRate4); addRate(incomeTaxRate5); }
// this list could be dynamically loaded from a file // then load it from a list created using the file private IncomeTaxRates() { // we use variables here to be able to debug // latter we can change to directly add the new values to the set IncomeTaxRate incomeTaxRate1 = new IncomeTaxRate( 0, 18200, 0, 0.00M ); IncomeTaxRate incomeTaxRate2 = new IncomeTaxRate( 18201, 37000, 0, 0.19M ); IncomeTaxRate incomeTaxRate3 = new IncomeTaxRate( 37001, 80000, 3572, 0.325M); IncomeTaxRate incomeTaxRate4 = new IncomeTaxRate( 80001, 180000, 17547, 0.37M ); IncomeTaxRate incomeTaxRate5 = new IncomeTaxRate(180001, 100000000, 54547, 0.45M ); addRate(incomeTaxRate1); addRate(incomeTaxRate2); addRate(incomeTaxRate3); addRate(incomeTaxRate4); addRate(incomeTaxRate5); }
public void addRate(IncomeTaxRate incomeTaxRate) { incomeTaxRates.Add(incomeTaxRate); }