string currentDir = System.IO.Directory.GetCurrentDirectory();
//returns the current directory of the application when executing
string exePath = AppDomain.CurrentDomain.BaseDirectory;
// returns the directory where the .exe is located
Path.GetDirectoryName(filename);
Environment.CurrentDirectory