Skip to content

Look Up Taxes

  1. Enter Code

Enter the following code in a file named ‘Lookup.cs’:

using System;
using TaxControls;
class Test{
public static void Main(){
try {
CTaxControl tc = new CTaxControl();
String url="http://localhost:8000";
// using Plus Codes:
String work="VXX7+39 Washington, DC 20500";
String home="VWCV+PF Washington, DC 20301";
String nexus="VA MD DC";
String taxes=tc.TaxQuery(
work, home, url, nexus);
foreach(String t in taxes.Split(",")){
Console.WriteLine(t);
}
} catch (TaxControlException e) {
Console.WriteLine(e.Message);
}
}
}

Compile

Compile the code at the command prompt by executing the following:

Terminal window
csc /reference:TaxControls.dll Lookup.cs

Start TaxQuery

Start up the TaxQuery container if it’s not already running:

Terminal window
docker run -p 8443:8443 calibertechnology/taxquery

The -p 8443:8443 argument tells the image to listen for an https connection on port 8443.

Run

Run the code by typing:

Terminal window
Lookup