我正在尝试读取另一个应用程序 (app.exe.config) 的配置文件中的应用程序设置。
我已经尝试了几件事。最近我用这个:
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(FullPath() + ".config");
// Get the AppSetins section.
AppSettingsSection appSettingSection = config.AppSettings;
// Display raw xml.
Debug.WriteLine(appSettingSection.SectionInformation.GetRawXml());
但 GetRawXml() 什么也不返回。我哪里错了?FullPath() 方法返回正确的路径,我已经测试过了。
米