static void Main(string[] args) { if (!ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine)) { if (!ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)) { System.Console.WriteLine("This application could not load the correct version of ArcGIS."); return; } } m_AOLicenseInitializer = new LicenseInitializer(); //ESRI License Initializer generated code. if (!m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeBasic, esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced }, new esriLicenseExtensionCode[] { esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork })) { System.Console.WriteLine(m_AOLicenseInitializer.LicenseMessage()); System.Console.WriteLine("This application could not initialize with the correct ArcGIS license and will shutdown."); m_AOLicenseInitializer.ShutdownApplication(); return; } RouteClass routeClass = new RouteClass(); routeClass.SolveRoute(); //ESRI License Initializer generated code. //Do not make any call to ArcObjects after ShutDownApplication() m_AOLicenseInitializer.ShutdownApplication(); }