<configSections> element for <configuration>

Contains configuration section and namespace declarations.




Parent element

<configuration> The root element in every configuration file used by the common language runtime and .NET Framework applications.

Child elements

<section> Contains a configuration section declaration.
<sectionGroup> Defines a namespace for configuration sections.
<remove> Removes a predefined section or section group.
<clear> 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 file schema for the .NET Framework