如何才能知道哪个目录我的控制台应用程序是用C#运行?我的、控制台、应用程序、目录

由网友(-永垂不朽的只有毛爷爷,)分享简介:我如何找出目录我的控制台应用程序是用C#运行?How do I find out what directory my console app is running in with C#?推荐答案要取得相应目录所在的.exe文件是:To get the directory where the .exe file...

我如何找出目录我的控制台应用程序是用C#运行?

How do I find out what directory my console app is running in with C#?

推荐答案

要取得相应目录所在的.exe文件是:

To get the directory where the .exe file is:

AppDomain.CurrentDomain.BaseDirectory

要获得当前目录:

Environment.CurrentDirectory
阅读全文

相关推荐

最新文章