<configSections> Element

Contains configuration section and namespace declarations.



Child Elements

Element Description
<section> Contains a configuration section declaration.
<sectionGroup> Defines a namespace for configuration sections.
<remove> element for <configSections> Removes a predefined section or section group.
<clear> element for <configSections> Clears all previously defined sections and section groups.


If this element is in a configuration file, it must be the first child element of the <configuration> element.


The following example shows how to define a configuration section and define settings for that section.

      <section name="sampleSection"
               type="System.Configuration.SingleTagSectionHandler" />
   <sampleSection setting1="Value1" setting2="value two" 
                  setting3="third value" />

Configuration File

This element can be used in the application configuration file, machine configuration file (Machine.config), and Web.config files that are not at the application directory level.

See Also

Configuration Sections Schema | Configuration Section Settings