Settings in configuration files (such as the Web.config file) are organized into sections. Because some sections are related, it is often convenient to group them in a section group. The ConfigurationSectionGroup class represents the sectionGroup XML element that is used to group sections when they are defined in the configSections element of a configuration file. Section groups can be nested (a section group can contain other section groups as well as sections). The following example shows a configSections element that defines three nested section groups:
<configSections>
<sectionGroup name="system.web.extensions"...>
<sectionGroup name="scripting" ...>
<section name="scriptResourceHandler".../>
<sectionGroup name="webServices"...>
<section name="jsonSerialization" .../>
<section name="profileService" ... /> <section name="authenticationService" .../>
<section name="roleService" .../>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
The configuration system loads settings from configuration files into ConfigurationSectionGroup objects. You can use the Sections and SectionGroups properties to access the sections and section groups that are contained in a ConfigurationSectionGroup object.
For more information about how to access information from configuration files, see the ConfigurationManager class.