码迷,mamicode.com
首页 > Windows程序 > 详细

C# 读取webConfig配置

时间:2017-04-15 18:18:06      阅读:399      评论:0      收藏:0      [点我收藏+]

标签:webconfig   .config   sharp   app   nbsp   .com   log   c#   manager   

获取百度URL 

var url = System.Configuration.ConfigurationManager.AppSettings["BaiduUrl"];

<configuration>
  <appSettings>
    <add key="BaiDuUrl" value="http://baidu.com" />
  </appSettings>
</configuration>

  

 

C# 读取webConfig配置

标签:webconfig   .config   sharp   app   nbsp   .com   log   c#   manager   

原文地址:http://www.cnblogs.com/wky-z/p/6714766.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!