/// <summary> /// 获取App.config配置文件某个节点的值 /// </summary> /// <param name="name">节点名称</param> /// <returns></returns> private string GetConfigValue(string name) { ExeConfigurationFileMap map = new ExeConfigurationFileMap(); //另一个程序App.config配置文件所在的路径 map.ExeConfigFilename = AppDomain.CurrentDomain.BaseDirectory + "\\updater.config"; Configuration config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); return config.AppSettings.Settings[name].Value; }
标签:map,配置文件,程序运行,C#,App,config From: https://www.cnblogs.com/xiaomianyang/p/16588846.html