Muokkaa

Jaa


<configSections> element for <configuration>

Contains configuration section and namespace declarations.

<configuration>
  <configSections>

Attributes

None

Parent element

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

Child elements

Description
<section> Contains a configuration section declaration.
<sectionGroup> Defines a namespace for configuration sections.

Remarks

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

Example

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

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

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