Share via


Configuration.RootSectionGroup Property

Definition

Gets the root configuration section group for this Configuration object.

public:
 property Microsoft::Web::Administration::SectionGroup ^ RootSectionGroup { Microsoft::Web::Administration::SectionGroup ^ get(); };
public Microsoft.Web.Administration.SectionGroup RootSectionGroup { get; }
member this.RootSectionGroup : Microsoft.Web.Administration.SectionGroup
Public ReadOnly Property RootSectionGroup As SectionGroup

Property Value

The root configuration SectionGroup for this Configuration object.

Examples

The following example gets the root section for the Configuration object and displays the name of each section definition within the section group.

public void GetGetRootSectionGroup(ServerManager manager)
{
    Configuration config = manager.GetAdministrationConfiguration();
    SectionGroup sectionGroup = config.RootSectionGroup;
    Console.WriteLine("There are " + sectionGroup.Sections.Count.ToString() +
        " Sections in the root section group: " + sectionGroup.SectionGroups.ToString());
    foreach (SectionDefinition def in sectionGroup.Sections)
    {
        Console.WriteLine("\t{0}", def.Name);
    }
}

Remarks

This property returns the section group that defines the root section group for the current section.

Applies to

See also