摘要: 摘自:http://www.cnblogs.com/85538649/archive/2011/08/18/RootDirectory.html编写程序的时候,经常需要用的项目根目录。自己总结如下1、取得控制台应用程序的根目录方法 方法1、Environment.CurrentDirectory 取得或设置当前工作目录的完整限定路径 方法2、AppDomain.CurrentDomain.BaseDirectory 获取基目录,它由程序集冲突解决程序用来探测程序集2、取得Web应用程序的根目录方法 方法1、HttpRuntime.AppDomainAppPath.ToString();//获取 阅读全文
posted @ 2013-05-27 19:42 KeenLeung 阅读(257) 评论(0) 推荐(0) 编辑