C#取得Web程序和非Web程序的根目录的N种取法总结

 更新时间:2008年03月09日 20:21:40   作者:  
C#取得Web程序和非Web程序的根目录的N种取法,方便大家知道,有更好的方法,请说明
非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();

相关文章

最新评论