【问题标题】:c# app.config nested sectionc# app.config 嵌套部分
【发布时间】:2013-10-22 06:32:05
【问题描述】:

我想在 app.config 中有一个嵌套的自定义部分,如下所示,但在 C# 中创建类对象时遇到了困难。

<customSettings>
    <brands>
       <brand name="abc">
          <mailbox server="" port="" />
          <mailbox server="" port="" />
       </brand>
       <brand name="xyz">
          <mailbox server="" port="" />
          <mailbox server="" port="" />
       </brand>
    </brands>
</customSettings>

请帮忙。

非常感谢。

【问题讨论】:

  • 有很多例子可以实现这一点。到目前为止你有没有尝试过?

标签: c# app-config custom-sections


【解决方案1】:

Phil Haack 提供了有关进行自定义配置的最佳分步说明。与 MSDN 文档相比,它确实帮助了我。 http://particular.net/articles/generic-host-sample

【讨论】:

    猜你喜欢
    • 2011-06-28
    • 2015-07-05
    • 2012-10-28
    • 1970-01-01
    • 2011-07-31
    • 2012-02-26
    • 2011-05-19
    • 2015-06-18
    • 2012-10-04
    相关资源
    最近更新 更多