ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = GPARAM._configFileFullName;
var config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); var sett = config.AppSettings.Settings["client_req_us"];
if (sett != null && sett.Value != "" && model != null && model.log_type == "client_req_us")
{
return;
} sett = config.AppSettings.Settings["third_return_us"];
if (sett != null && sett.Value != "" && model != null && model.log_type == "third_return_us")
{
return;
}
0--
项目要引用 System.Configuration.DLL
类文件中 using System.Configuration;