SectionInformation::ForceDeclaration Method

 

Forces the associated configuration section to appear in the configuration file.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

NameDescription
System_CAPS_pubmethodForceDeclaration()

Forces the associated configuration section to appear in the configuration file.

System_CAPS_pubmethodForceDeclaration(Boolean)

Forces the associated configuration section to appear in the configuration file, or removes an existing section from the configuration file.

A configuration section is not written in a configuration file when it is inherited from a parent file. If you want the parent section to show in the child configuration file, you must set the ForceDeclaration to true. This makes a configuration file more portable from one computer to another. This also lets you make sure that the section exists even if you do not have control over parent configuration files.

Return to top
Show: