.NET 配置文件中的自定义节处理程序中的嵌套级别

发布于 2024-08-28 01:17:45 字数 467 浏览 2 评论 0原文

我知道我可以在自己的自定义 app.config 部分中有 1 个父元素和 1 个子元素,如下所示:

<sectionGroup>
<section>
    <element />
</section>
</sectionGroup>

我的问题是,我可以有比这更多的一层或多层嵌套吗?就像这样:

<biggestSectionGroup>
<biggerSectionGroup>
<sectionGroup>
    <section>
        <element />
    </section>
</sectionGroup>
</biggerSectionGroup>
</biggestSectionGroup>

I know I can have 1 parent element and 1 child element in my own custom app.config section like so:

<sectionGroup>
<section>
    <element />
</section>
</sectionGroup>

My question is, can I have one or more levels of nesting more than this? Like so:

<biggestSectionGroup>
<biggerSectionGroup>
<sectionGroup>
    <section>
        <element />
    </section>
</sectionGroup>
</biggerSectionGroup>
</biggestSectionGroup>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终难愈 2024-09-04 01:17:45

是的,你可以。

有一系列(稍微旧但仍然非常好的)文章(第 1 部分第 2 部分 第 3 部分) 描述了您可能想了解的有关配置文件的所有信息。他们详细描述了如何实现您所描述的目标。

Yes you can.

There is a series of (slightly old but still very good) articles (part 1, part 2 & part 3) on CodeProject that describe everything you could want to know about config files. They describe in detail how to attain what you describe.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文