ConfigurationSectionGroup.Sections 属性

定义

获取一个 ConfigurationSectionCollection 对象,其中包含此 ConfigurationSection 对象中的所有 ConfigurationSectionGroup 对象。

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

属性值

一个 ConfigurationSectionCollection 对象,其中包含此 ConfigurationSection 对象中的所有 ConfigurationSectionGroup 对象。

示例

下面的代码示例演示如何访问 Sections 属性。 这是 类概述中提供的更大示例的 ConfigurationSectionGroup 一部分。

foreach (ConfigurationSection section 
    in sectionGroup.Sections)
{
    indent("Section Name:" + section.SectionInformation.Name);
}
Dim section As ConfigurationSection
For Each section In sectionGroup.Sections
    indent("Section Name:" + section.SectionInformation.Name)
Next section

适用于

另请参阅