ConfigurationPropertyCollection クラス

定義

構成要素のプロパティのコレクションを表します。

public ref class ConfigurationPropertyCollection : System::Collections::ICollection
public class ConfigurationPropertyCollection : System.Collections.ICollection
type ConfigurationPropertyCollection = class
    interface ICollection
    interface IEnumerable
Public Class ConfigurationPropertyCollection
Implements ICollection
継承
ConfigurationPropertyCollection
実装

次の例は、 ConfigurationPropertyCollectionの使用可能な 1 つの使用例を示しています。 関連する型の ConfigurationPropertyの例を参照してください。

上記の例で使用した構成からの抜粋を次に示します。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="CustomSection" type="Samples.AspNet, ConfigurationProperty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" />
    </configSections>
    <CustomSection fileName="default.txt" alias="alias.txt" maxUsers="1000"
      maxIdleTime="00:05:00" />
</configuration>

注釈

ConfigurationPropertyCollection クラスは、構成要素の属性またはConfigurationPropertyオブジェクトにすることができるConfigurationElement オブジェクトのコレクションを表します。

ConfigurationProperty クラスは、個々の構成設定を表します。 これにより、特定の構成エンティティ (属性または要素) の名前、型、既定値を取得または設定できます。 追加のオプションを使用すると、属性が必須か、要素キーか、既定の要素コレクションを表すかを指定できます。

コンストラクター

名前 説明
ConfigurationPropertyCollection()

ConfigurationPropertyCollection クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
Count

コレクション内のプロパティの数を取得します。

IsSynchronized

コレクションへのアクセスが同期されているかどうかを示す値を取得します (スレッド セーフ)。

Item[String]

指定した名前のコレクション項目を取得します。

SyncRoot

コレクションへのアクセスを同期するオブジェクトを取得します。

メソッド

名前 説明
Add(ConfigurationProperty)

構成プロパティをコレクションに追加します。

Clear()

すべての構成プロパティ オブジェクトをコレクションから削除します。

Contains(String)

構成プロパティがこのコレクションに含まれるかどうかを指定します。

CopyTo(ConfigurationProperty[], Int32)

この ConfigurationPropertyCollection を配列にコピーします。

Equals(Object)

指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetEnumerator()

コレクションに適用される IEnumerator オブジェクトを取得します。

GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
Remove(String)

構成プロパティをコレクションから削除します。

ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

名前 説明
ICollection.CopyTo(Array, Int32)

このコレクションを配列にコピーします。

拡張メソッド

名前 説明
AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryableに変換します。

Cast<TResult>(IEnumerable)

IEnumerable の要素を指定した型にキャストします。

OfType<TResult>(IEnumerable)

指定した型に基づいて、IEnumerable の要素をフィルター処理します。

適用対象

こちらもご覧ください