C#获取当前目录的真实路径

Nov*_*vak 2 c# file-io file path

我有一个使用Visual Web Developer 2008构建的项目.我希望能够提取(使用C#)项目现在的当前文件夹.到现在为止,我不得不对真正的道路进行硬编码.

这个项目托管在我的电脑上.

例如,我想要生成的路径:

C:\Users\Guy\Desktop\Project
Run Code Online (Sandbox Code Playgroud)

谢谢!家伙

Ale*_*tis 11

基础装配解析器目录:

AppDomain.CurrentDomain.BaseDirectory;
Run Code Online (Sandbox Code Playgroud)