首页 > 其他 > 详细

读取配置文件参数和文件路径

时间:2016-03-29 12:41:08      阅读:235      评论:0      收藏:0      [点我收藏+]

1.读取配置文件参数

<appSettings>
    <add key="Log4net" value="1"/>

</appSettings>

string filePath = System.Configuration.ConfigurationManager.AppSettings["log4netPath"].ToString();

System.IO.FileInfo file = new System.IO.FileInfo(HttpContext.Current.Server.MapPath(filePath));

读取配置文件参数和文件路径

原文:http://www.cnblogs.com/hanxingli/p/5332193.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!