app.config: <add key="Password" value="123456"/>
C#: string TQpwd = System.Configuration.ConfigurationManager.AppSettings["Password"].ToString();
需要引用 using System.Configuration;