标签:
string exePath = System.IO.Path.Combine(Environment.CurrentDirectory, "WindowsFormsApp.exe");
// Get the configuration file.
Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
AppSettingsSection appSettings = config.Sections["appSettings"] as AppSettingsSection;
MessageBox.Show(appSettings.Settings["test"].Value);
c# 读取app.config遇到生成X.config.config问题
标签:
原文地址:http://www.cnblogs.com/mandalaluo/p/4737388.html