在. NET 中从 app.config 或 web.config 读取设置

ConfigurationSettings.AppSettings.Get("MySetting")
ConfigurationManager.AppSettings["MySetting"]

答案