获取应用程序路径的区别
代码
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\
//string filepath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug
//string filepath = System.IO.Directory.GetCurrentDirectory();
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\
//string filepath = AppDomain.CurrentDomain.BaseDirectory;
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug
//string filepath = Application.StartupPath;
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\ResFinder.exe
//string filepath = Application.ExecutablePath;
//string filepath = System.IO.Directory.GetCurrentDirectory();
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\
//string filepath = AppDomain.CurrentDomain.BaseDirectory;
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug
//string filepath = Application.StartupPath;
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\ResFinder.exe
//string filepath = Application.ExecutablePath;
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\
//string filepath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;