标签:
ExeConfigurationFileMap map = new ExeConfigurationFileMap(); map.ExeConfigFilename = @"F:\App1.config"; ; Configuration config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); string connstr = config.ConnectionStrings.ConnectionStrings["connStr"].ConnectionString; MessageBox.Show(connstr); string key = config.AppSettings.Settings["key"].Value; MessageBox.Show(key);
标签:
原文地址:http://www.cnblogs.com/a849788087/p/5759611.html