views:

41

answers:

1

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>
+2  A: 

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.

adrianbanks
+1 For linking my articles. :) Thanks!
jrista
Thanks very much, adrianbanks.I am in a hurry at the moment, to finish a code base and prefer a smaller article. Or, better yet, one of the heirarchies I need to implement in my app.config is this:<DataCollectionPolicy get="*|none|all"><Exceptions><add name="DataManagerName" value="true|false" /></Exceptions></DataCollectionPolicy>I'd be delighted if you could tell me how to write a custom config section handler for this one.I do know how to implement one for 1 level of nesting.
Water Cooler v2
I'm trying. May be I can. I'll let you know if I have a problem.
Water Cooler v2