1

Possible Duplicate:
How to Create a Configuration Section That Contains a Collection of Collections?

I would like to create something like this custom section in a web.config

<MyCustomSection>
     <Collection name="test">
        <item name="foo" />
        <item name="bar">
     </Collection>
     <Collection name="test2">
        <item name="bob" />
        <item name="joe" />
     </Collection>
     ...
</MyCustomSection>

I've seen a number of tutorials show how to create a Collection (like this one: http://dotnetslackers.com/articles/customconfiguration/Custom_Configuration_Collections.aspx) but nothing showing how to create a collection of collections. Is this even possible?

Community
  • 1
  • 1
Mikeb
  • 781
  • 7
  • 24
  • I had asked something similar a while back.. maybe it will help you: http://stackoverflow.com/questions/7126034/c-net-4-0-creating-custom-configelements-and-configcollection – Justin Self Oct 16 '12 at 22:58
  • You can use the same approach as described in the article and define a Item property(List) in the collection element. Its all about parsing the item elements from the collection element. If you need additional help, please post your code. – Tariqulazam Oct 16 '12 at 23:03
  • The following answer might help you, except that I never got any answers at all: http://stackoverflow.com/questions/10958054/how-to-create-a-configuration-section-that-contains-a-collection-of-collections – John Saunders Oct 16 '12 at 23:58
  • Answered @JohnSaunders question. View the answer here: http://stackoverflow.com/a/13254002/211627 – JDB Nov 06 '12 at 15:18

0 Answers0