星空网 > 软件开发 > ASP.net

C#中AppDomain.CurrentDomain.BaseDirectory及各种路径获取方法

// 获取程序的基目录。
System.AppDomain.CurrentDomain.BaseDirectory

// 获取模块的完整路径,包含文件名
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName

// 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。
System.Environment.CurrentDirectory

// 获取应用程序的当前工作目录,注意工作目录是可以改变的,而不限定在程序所在目录
System.IO.Directory.GetCurrentDirectory()

// 获取和设置包括该应用程序的目录的名称。
System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase

// 获取启动了应用程序的可执行文件的路径。
System.Windows.Forms.Application.StartupPath

// 获取启动了应用程序的可执行文件的路径及文件名
System.Windows.Forms.Application.ExecutablePath




原标题:C#中AppDomain.CurrentDomain.BaseDirectory及各种路径获取方法

关键词:C#

C#
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

英国fba多少钱:https://www.goluckyvip.com/tag/47891.html
英国fba发货:https://www.goluckyvip.com/tag/47892.html
英国fba费:https://www.goluckyvip.com/tag/47893.html
英国fba费用是多少:https://www.goluckyvip.com/tag/47894.html
英国fba海派:https://www.goluckyvip.com/tag/47895.html
英国fba海外仓:https://www.goluckyvip.com/tag/47896.html
从园岭新村到大梅沙海滨总站坐什么车:https://www.vstour.cn/a/363191.html
七月份适合去日本旅游吗 7月份去日本哪里好玩:https://www.vstour.cn/a/363192.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流