SectionInformation.GetParentSection Method ()
.NET Framework (current version)
Gets the configuration section that contains the configuration section associated with this object.
Assembly: System.Configuration (in System.Configuration.dll)
Return Value
Type: System.Configuration.ConfigurationSectionThe configuration section that contains the ConfigurationSection that is associated with this SectionInformation object.
| Exception | Condition |
|---|---|
| InvalidOperationException | The method is invoked from a parent section. |
If this ConfigurationSection object has no parent sections, the GetParentSection method returns the same value as the Name property.
The following example shows how to use the GetParentSection method.
.NET Framework
Available since 2.0
Available since 2.0
Show: