.Net获取配置信息

做开发时,需要读取配置文件信息。.Net项目已经有配置文件,比如:Web.config,App.config,要读取这些配置文件里的信息,需要引用`System.Configuration`

以appSettings为例,使用`System.Configuration.ConfigurationManager.AppSettings[keyName] ` 即可获取配置信息

发表评论

邮箱地址不会被公开。 必填项已用*标注