开发者

Nesting Levels in Custom Section Handlers in .NET Configuration Files

开发者 https://www.devze.com 2022-12-25 09:43 出处:网络
I know I can have 1 parent element and 1 child element in my own custom app.config section like so: <sectionGroup开发者_JAVA技巧>

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

<sectionGroup开发者_JAVA技巧>
<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>


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消