C#取得Web程序和非Web程序的根目录的N种取法总结
时间:2021-03-16 10:21:31|栏目:.NET代码|点击: 次
非Web程序
1.AppDomain.CurrentDomain.BaseDirectory
2.Environment.CurrentDirectory
3.HttpRuntime.BinDirectory
The path to the current application's/bin directory.
Web程序
HttpCurrent.Context.Server.Mappath();
1.AppDomain.CurrentDomain.BaseDirectory
2.Environment.CurrentDirectory
3.HttpRuntime.BinDirectory
The path to the current application's/bin directory.
Web程序
HttpCurrent.Context.Server.Mappath();
栏 目:.NET代码
下一篇:C#调用动态unlha32.dll解压Lha后缀的打包文件分享
本文标题:C#取得Web程序和非Web程序的根目录的N种取法总结
本文地址:http://www.codeinn.net/misctech/81822.html