Configuration.SectionGroups Eigenschap

Definitie

Hiermee haalt u een verzameling van de sectiegroepen op die door deze configuratie zijn gedefinieerd.

public:
 property System::Configuration::ConfigurationSectionGroupCollection ^ SectionGroups { System::Configuration::ConfigurationSectionGroupCollection ^ get(); };
public System.Configuration.ConfigurationSectionGroupCollection SectionGroups { get; }
member this.SectionGroups : System.Configuration.ConfigurationSectionGroupCollection
Public ReadOnly Property SectionGroups As ConfigurationSectionGroupCollection

Waarde van eigenschap

Een ConfigurationSectionGroupCollection verzameling die de verzameling sectiegroepen voor dit Configuration object vertegenwoordigt.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de SectionGroups eigenschap gebruikt.

ConfigurationSectionGroupCollection
    groups = config.SectionGroups;
Console.WriteLine("Groups: {0}", groups.Count.ToString());
foreach (ConfigurationSectionGroup group in groups)
{
    Console.WriteLine("Group Name: {0}", group.Name);
   // Console.WriteLine("Group Type: {0}", group.Type);
}
Dim groups As ConfigurationSectionGroupCollection = config.SectionGroups
Console.WriteLine("Groups: {0}", groups.Count.ToString())
For Each group As ConfigurationSectionGroup In groups
    Console.WriteLine("Group Name: {0}", group.Name)
    ' Console.WriteLine("Group Type: {0}", group.Type);
Next group

Opmerkingen

Configuratiesecties kunnen worden gecombineerd in groepen voor het gemak en extra functionaliteit. Open de SectionGroups eigenschap om het ConfigurationSectionGroupCollection object op te halen dat de verzameling sectiegroepen voor dit Configuration object vertegenwoordigt. Als dit Configuration object een overgenomen weergave vertegenwoordigt, wordt de samengevoegde lijst met sectiegroepen geretourneerd.

Van toepassing op