如:
<configSections >
<sectionGroup name="Example1">
<section name="TableName" type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup>
<sectionGroup name="Example2">
<section name="TableName" type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup>
<sectionGroup name="Example3">
<section name="TableName" type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup> </configSections>我怎么知道他有三个组,并且访问每个组的名字?
<configSections >
<sectionGroup name="Example1">
<section name="TableName" type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup>
<sectionGroup name="Example2">
<section name="TableName" type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup>
<sectionGroup name="Example3">
<section name="TableName" type="System.Configuration.SingleTagSectionHandler"/>
</sectionGroup> </configSections>我怎么知道他有三个组,并且访问每个组的名字?
groups = config.SectionGroups;
Console.WriteLine("Groups: {0}",
groups.Count.ToString());
groups = config.SectionGroups;
Console.WriteLine("Groups: {0}",
groups.Count.ToString());这个统计的是一个节组里的节有多少个,但是我要统计的是有多少个节组啊