SectionInformation.GetParentSection Method

Note: This method is new in the .NET Framework version 2.0.

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 ()
public ConfigurationSection GetParentSection ()
public function GetParentSection () : ConfigurationSection

Return Value

The configuration section that contains the ConfigurationSection associated with this SectionInformation object.

If this ConfigurationSection object has no parent sections, the GetParentSection method returns the same value as the Name property.

The following code example shows how to use the GetParentSection method.

static public void GetParentSection()
    SectionInformation sInfo = 

    ConfigurationSection parentSection =

    Console.WriteLine("Parent section : {0",

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions