Configuration.Sections Eigenschap

Definitie

Hiermee haalt u een verzameling van de secties op die door dit Configuration object zijn gedefinieerd.

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

Waarde van eigenschap

Een verzameling van de secties die door dit Configuration object zijn gedefinieerd.

Voorbeelden

In het volgende voorbeeld ziet u hoe u de Sections eigenschapswaarde ophaalt en het aantal secties in de verzameling weergeeft.

ConfigurationSectionCollection
    sections = config.Sections;
Console.WriteLine("Sections: {0}", sections.Count.ToString());
Dim sections As ConfigurationSectionCollection = config.Sections
Console.WriteLine("Sections: {0}", sections.Count.ToString())

Opmerkingen

Open de Sections eigenschap om een ConfigurationSectionCollection object op te halen dat de verzameling secties voor dit Configuration object vertegenwoordigt. Als dit Configuration object een samengevoegde configuratie vertegenwoordigt, wordt de samengevoegde lijst met secties geretourneerd.

Van toepassing op