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

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

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

需要引用  using System.Configuration;

原文地址:https://www.cnblogs.com/dayang12525/p/6370021.html