Share via


ConfigurationElement.GetCollection メソッド

定義

現在の構成要素に属するすべての構成要素を返します。

オーバーロード

GetCollection(String, Type)

指定した名前と型を持ち、現在の構成要素の下にある構成要素を返します。

GetCollection(Type)

指定した型を持ち、現在の構成要素の下にある構成要素を返します。

GetCollection(String)

現在の構成要素に属するすべての構成要素を返します。

GetCollection()

現在の構成要素の既定のコレクションを返します。

GetCollection(String, Type)

指定した名前と型を持ち、現在の構成要素の下にある構成要素を返します。

public:
 Microsoft::Web::Administration::ConfigurationElement ^ GetCollection(System::String ^ collectionName, Type ^ collectionType);
public Microsoft.Web.Administration.ConfigurationElement GetCollection (string collectionName, Type collectionType);
member this.GetCollection : string * Type -> Microsoft.Web.Administration.ConfigurationElement
Public Function GetCollection (collectionName As String, collectionType As Type) As ConfigurationElement

パラメーター

collectionName
String

このメソッドが返す要素の名前。

collectionType
Type

このメソッドが返すコレクションの共通言語ランタイム (CLR) 型。

戻り値

ConfigurationElement オブジェクト。

例外

collectionType パラメーターは null です。

注釈

プロパティで ChildElements 表される子要素コレクションは、 メソッドの戻り値 GetCollection によって表される入れ子になった要素コレクションとは異なります。 両方のコレクションに オブジェクトが含まれています ConfigurationElement 。 ただし、構成セクションなどの一意の子要素について構成を照会する場合は、 プロパティを使用 ChildElements する system.webServer/asp 必要があります。 一意のキーまたは複数属性キー (構成セクションなど) を含むコレクション要素の構成に対してクエリを実行する場合は、 メソッドを使用 GetCollection する system.webServer/sites 必要があります

適用対象

GetCollection(Type)

指定した型を持ち、現在の構成要素の下にある構成要素を返します。

public:
 Microsoft::Web::Administration::ConfigurationElement ^ GetCollection(Type ^ collectionType);
public Microsoft.Web.Administration.ConfigurationElement GetCollection (Type collectionType);
member this.GetCollection : Type -> Microsoft.Web.Administration.ConfigurationElement
Public Function GetCollection (collectionType As Type) As ConfigurationElement

パラメーター

collectionType
Type

このメソッドが返すコレクションの共通言語ランタイム (CLR) 型。

戻り値

ConfigurationElement オブジェクト。

例外

collectionType パラメーターは null または空です。

注釈

プロパティで ChildElements 表される子要素コレクションは、 メソッドの戻り値 GetCollection によって表される入れ子になった要素コレクションとは異なります。 両方のコレクションに オブジェクトが含まれています ConfigurationElement 。 ただし、構成セクションなどの一意の子要素について構成を照会する場合は、 プロパティを使用 ChildElements する system.webServer/asp 必要があります。 一意のキーまたは複数属性キー (構成セクションなど) を含むコレクション要素の構成に対してクエリを実行する場合は、 メソッドを使用 GetCollection する system.webServer/sites 必要があります

適用対象

GetCollection(String)

現在の構成要素に属するすべての構成要素を返します。

public:
 Microsoft::Web::Administration::ConfigurationElementCollection ^ GetCollection(System::String ^ collectionName);
public Microsoft.Web.Administration.ConfigurationElementCollection GetCollection (string collectionName);
member this.GetCollection : string -> Microsoft.Web.Administration.ConfigurationElementCollection
Public Function GetCollection (collectionName As String) As ConfigurationElementCollection

パラメーター

collectionName
String

このメソッドが返すコレクションの名前。

戻り値

ConfigurationElementCollection オブジェクト。

例外

collectionName パラメーターは null または空です。

適用対象

GetCollection()

現在の構成要素の既定のコレクションを返します。

public:
 Microsoft::Web::Administration::ConfigurationElementCollection ^ GetCollection();
public Microsoft.Web.Administration.ConfigurationElementCollection GetCollection ();
member this.GetCollection : unit -> Microsoft.Web.Administration.ConfigurationElementCollection
Public Function GetCollection () As ConfigurationElementCollection

戻り値

現在の ConfigurationElementCollection 構成要素の既定のコレクションを表す オブジェクト。

注釈

プロパティで ChildElements 表される子要素コレクションは、 メソッドの戻り値 GetCollection によって表される入れ子になった要素コレクションとは異なります。 両方のコレクションに オブジェクトが含まれています ConfigurationElement 。 ただし、構成セクションなどの一意の子要素について構成を照会する場合は、 プロパティを使用 ChildElements する system.webServer/asp 必要があります。 一意のキーまたは複数属性キー (構成セクションなど) を含むコレクション要素の構成に対してクエリを実行する場合は、 メソッドを使用 GetCollection する system.webServer/sites 必要があります。

適用対象