常用代码c#

当使用 HttpContext.Current用到不是当前线程会出null的情况,可使用 System.Web.HttpRuntime.AppDomainAppPath获取程序的根路
 string path = HttpContext.Current.Server.MapPath("d:\a.txt");

猜你喜欢

转载自www.cnblogs.com/qinzb/p/9638472.html