【发布时间】:2012-09-27 23:23:30
【问题描述】:
在我的项目中,我有两个名为app.config 和accessLevel.config 的应用程序配置文件。现在使用OpenExeConfiguration,我可以访问app.config.exe file,但不能访问accessLevel.config。请帮忙。
我有 2 个配置文件的主要原因是为了显示差异并简化代码。
我需要在我的C# 代码中读取accessLevel.config 的值。
尝试了以下代码但没有用:
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.File = "App2.config";
【问题讨论】:
标签: c# app-config configuration-files config configurationmanager