读取web.config和app.config配置文件

Posted 方寸之间

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了读取web.config和app.config配置文件相关的知识,希望对你有一定的参考价值。

  app.config:       <add key="Password" value="123456"/>

C#:   string TQpwd = System.Configuration.ConfigurationManager.AppSettings["Password"].ToString();

需要引用  using System.Configuration;

以上是关于读取web.config和app.config配置文件的主要内容,如果未能解决你的问题,请参考以下文章