c#怎么获取当前程序的路径

   2024-11-01 4720
核心提示:在C#中,可以使用System.AppDomain.CurrentDomain.BaseDirectory属性来获取当前程序的路径。示例如下:string currentPath = Sys

在C#中,可以使用System.AppDomain.CurrentDomain.BaseDirectory属性来获取当前程序的路径。示例如下:

string currentPath = System.AppDomain.CurrentDomain.BaseDirectory;Console.WriteLine(currentPath);

这样就可以获取到当前程序的路径并输出到控制台。

 
举报打赏
 
更多>同类网点查询
推荐图文
推荐网点查询
点击排行

网站首页  |  关于我们  |  联系方式网站留言    |  赣ICP备2021007278号