Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SectionInformation::GetParentSection Method ()

 

Gets the configuration section that contains the configuration section associated with this object.

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

public:
ConfigurationSection^ GetParentSection()

Return Value

Type: System.Configuration::ConfigurationSection^

The 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: