在AppSettings App.Config节点中嵌套子部分

时间:2013-07-26 14:51:40

标签: c# wpf xml app-config

这个问题的灵感来自并作为此处问题的扩展:sub appsettings in the appsetting node c#

我的问题是,是否可以在WPF中的App.config中的appSettings节点中嵌套更多节点,然后相应地访问它们?

类似的东西:

<configuration>
    <appSettings>
        <UISettings>
            <add key="SomeUIKey" value="SomeUIValue" />
        </UISettings>
        <ProgramSettings>
            <add key="SomeProgramKey" value="SomeProgramValue" />
        </ProgramSettings>
    </appSettings>
</configuration>

根据Meta Stackoverflow的要求,我想澄清一下,原始问题的接受答案在我看来是不能令人满意的,因为它提供了一个解决方法,而不是对问题的可靠回答。我要做的是不指定进一步的configSections,而是以类似于自定义sectionGroup的方式使用appSettings。这甚至可能吗?

0 个答案:

没有答案