我想获取应用程序的根文件夹.我使用了以下代码,但这给了bin文件夹,但我需要的是应用程序的根文件夹.有可能得到这个吗?
// This is the full directory and exe name
String fullAppName = Assembly.GetExecutingAssembly().GetName().CodeBase;
// This strips off the exe name
String fullAppPath = Path.GetDirectoryName(fullAppName);
Run Code Online (Sandbox Code Playgroud)