Skip to content

SelectedTax

A property which selects the tax to be used in subsequent calculations. For example,

Syntax

value = object.SelectedTax

object.SelectedTax = value

object is a TaxControl instance.

value is a string variable or expression.

Details

Use this property to select which tax is to be calculated. For example:

// using TaxControls;
try {
TaxControl tc = new TaxControl();
tc.DataFilename = "us.dat";
tc.SelectedTax = "federal income tax";
} catch (TaxControlException e) {
Console.WriteLine(e.Message);
}

Note: Setting the value to a nonexistent tax will cause a run-time error, as will setting this value before setting DataFilename (see Error Messages).