//string strxdebugenabled = System.Configuration.ConfigurationManager.AppSettings["xdebugenabled"];
ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = AppDomain.CurrentDomain.BaseDirectory + "/DCONFIG/App.config";
Configuration config = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);
//string connstr = config.ConnectionStrings.ConnectionStrings["appSettings"].ConnectionString;
string strxdebugenabled = config.AppSettings.Settings["xdebugenabled"].Value;
.NetCore 获取项目配置文件信息
最新推荐文章于 2024-07-12 08:00:00 发布