Configuration.Sections プロパティ

定義

この Configuration オブジェクトで定義されているセクションのコレクションを取得します。

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

プロパティ値

この Configuration オブジェクトで定義されているセクションのコレクション。

次の例は、プロパティ値を Sections 取得し、コレクション内のセクションの数を表示する方法を示しています。

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

注釈

プロパティに Sections アクセスして、 ConfigurationSectionCollection この Configuration オブジェクトのセクションのコレクションを表すオブジェクトを取得します。 このオブジェクトが Configuration マージされた構成を表す場合は、セクションのマージされたリストが返されます。

適用対象