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

非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();

TraceBack: http://www.cnblogs.com/goody9807/archive/2006/10/20/534880.html

转载于:https://www.cnblogs.com/hdjjun/archive/2008/06/17/1223855.html

猜你喜欢

转载自blog.csdn.net/weixin_33829657/article/details/94497450