明净

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2016年11月24日

摘要: 转自:WebForm和WinForm取当前根目录的通用的方法 转自:WebForm和WinForm取当前根目录的通用的方法 某些环境下用 System.Web.HttpContext.Current.Server.MapPath 取不到目录。 可以用下面两个方法: 一,System.AppDomai 阅读全文
posted @ 2016-11-24 10:13 明净 阅读(249) 评论(0) 推荐(0) 编辑

摘要: string path = ""; if (System.Environment.CurrentDirectory == AppDomain.CurrentDomain.BaseDirectory) { path = AppDomain.CurrentDomain.BaseDirectory; } 阅读全文
posted @ 2016-11-24 10:08 明净 阅读(167) 评论(0) 推荐(0) 编辑