B
Bill McCormick
Hello,
How can one access sectionGroup/sections (iterate or LINQ query) in app.config?
<configuration>
<configSections>
<sectionGroup name="groups">
<section name="group1"
type="System.Configuration.SingleTagSectionHandler"/>
<section name="group2"
type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup>
</configSections>
<groups>
<group1 value1="value11" value2="value12" value3="value13" />
<group2 value1="value21" value2="value22" value3="value23" />
</groups>
</configuration>
So far I have the following:
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
foreach (ConfigurationSection group in
config.SectionGroups["groups"].Sections) {
//what field (collection?) in group contains the value1-3 values?
}
TIA Bill
How can one access sectionGroup/sections (iterate or LINQ query) in app.config?
<configuration>
<configSections>
<sectionGroup name="groups">
<section name="group1"
type="System.Configuration.SingleTagSectionHandler"/>
<section name="group2"
type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup>
</configSections>
<groups>
<group1 value1="value11" value2="value12" value3="value13" />
<group2 value1="value21" value2="value22" value3="value23" />
</groups>
</configuration>
So far I have the following:
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
foreach (ConfigurationSection group in
config.SectionGroups["groups"].Sections) {
//what field (collection?) in group contains the value1-3 values?
}
TIA Bill