Export (0) Print
Expand All

ConfigurationSectionGroup.Sections Property

Gets a ConfigurationSectionCollection object that contains all of ConfigurationSection objects within this ConfigurationSectionGroup object.

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

public ConfigurationSectionCollection Sections { get; }
/** @property */
public ConfigurationSectionCollection get_Sections ()

public function get Sections () : ConfigurationSectionCollection

Not applicable.

Property Value

A ConfigurationSectionCollection object that contains all the ConfigurationSection objects within this ConfigurationSectionGroup object.

The following code example shows how to access the Sections property.

ConfigurationSectionCollection sectionCollection = 
    sectionGroup.Sections;
foreach (String sectionName in sectionCollection.Keys)
{
    ConfigurationSection section = 
        (ConfigurationSection)sectionCollection[sectionName];
    Console.WriteLine(getSpacer() + "Section Name:" 
        + section.SectionInformation.Name);
}

Windows 98, Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft