Reputation: 4152
I want to read following custom section from app.config:
<StartupFolders>
<Folders name="a">
<add folderType="Inst" path="c:\foo" />
<add folderType="Prof" path="C:\foo1" />
</Folders>
<Folders name="b">
<add folderType="Inst" path="c:\foo" />
<add folderType="Prof" path="C:\foo1" />
</Folders>
</StartupFolders>
I found this link, but it does not say for multiple <Folders>
tag. Please help?
Upvotes: 5
Views: 3818
Reputation: 398
Hi You can Access custom sections like this
CustomConfigClass section = (CustomConfigClass)ConfigurationManager.GetSection("StartupFolders");
Hope it helps you.
Upvotes: 2