In an ideal C# application you can access application/executable path in following ways.
Application.StartupPath
System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location)
AppDomain.CurrentDomain.BaseDirectory
System.IO.Directory.GetCurrentDirectory()
Environment.CurrentDirectory
System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
System.IO.Path.GetDirectory(Application.ExecutablePath)
Following is a simple configuration file , where SQL SERVER information is stored and retrieved.
string app_path = AppDomain.CurrentDomain.BaseDirectory;
INIProfile inif = new INIProfile(app_path + "config.ini");
In this way you can used the application path in any part of your application.