1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 【转】C#获取当前路径7种方法

【转】C#获取当前路径7种方法

时间:2021-01-23 23:31:21

相关推荐

【转】C#获取当前路径7种方法

webform

var s = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; //C盘 IIS路径var s1 = System.Environment.CurrentDirectory; //同上 var s2 = System.IO.Directory.GetCurrentDirectory();//同上var s3 = System.AppDomain.CurrentDomain.BaseDirectory; //当前项目根目录var s4 = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase; //同上

winformSystem.Windows.Forms.Application.StartupPathSystem.Windows.Forms.Application.ExecutablePath

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。