Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Defines settings in a custom configuration section that is defined by a <section> element and uses the SingleTagSectionHandler class.
<configuration>
<sectionName>
<sectionName key="value" key2="value2" />
Attributes and attribute values are user defined.
Description | |
---|---|
<configuration> | The root element in every configuration file used by the common language runtime and .NET Framework applications. |
None
The <sectionName> element is a custom element defined by a <section> tag in the <configSections> element. The configuration system returns a IDictionary object when you call Configuration.GetSection(String).
The following example declares a custom element called <sampleSection> that contains settings read by the SingleTagSectionHandler class:
<configuration>
<configSections>
<section name="sampleSection"
type="System.Configuration.SingleTagSectionHandler" />
</configSections>
<sampleSection setting1="Value1"
setting2="value two"
setting3="third value" />
</configuration>
This element can be used in the application configuration file, the machine configuration file (Machine.config), and Web.config files that aren't at the application directory level.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now