// Declare a BarTender application variable
BarTender.Application btApp;
// Create a new instance of BarTender
btApp = new BarTender.Application();
// Set the BarTender application visible
btApp.Visible = true;
// Set the license server address property
btApp.LicenseServer.Address = "MyPC";
// Set the number of times BarTender will attempt to connect to the license server
btApp.LicenseServer.Retries = 3;
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);