PropertyDescriptorCollection クラス
アセンブリ: System (system.dll 内)


PropertyDescriptorCollection は読み取り専用であり、プロパティの追加または削除を行うためのメソッドは実装していません。これらのメソッドを実装するには、このクラスから継承する必要があります。
PropertyDescriptorCollection クラスで利用できるプロパティを使用して、コレクションに対してその内容を照会できます。コレクション内の要素の数を確認するには、Count プロパティを使用します。インデックス番号または名前で指定したプロパティを取得するには、Item プロパティを使用します。
プロパティのほかにも、Find メソッドを使用して、指定した名前を持つプロパティの説明をコレクションから取得することもできます。
![]() |
---|
このクラスに適用される HostProtectionAttribute 属性の Resources プロパティの値は、Synchronization です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。 |

button1 のプロパティを使用して、新しい PropertyDescriptorCollection を作成するコード例を次に示します。この例では、button1 がフォーム上でインスタンス化されていることが必要です。
Dim properties As PropertyDescriptorCollection = TypeDescriptor.GetProperties(button1)
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1);
PropertyDescriptorCollection^ properties = TypeDescriptor::GetProperties( button1 );
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1);
ボタンに関するすべてのプロパティをテキスト ボックスに出力する例を次に示します。この例では、button1 と textBox1 がフォーム上でインスタンス化されていることが必要です。
Private Sub MyPropertyCollection() ' Creates a new collection and assign it the properties for button1. Dim properties As PropertyDescriptorCollection = TypeDescriptor.GetProperties(button1) ' Displays each property in the collection in a text box. Dim myProperty As PropertyDescriptor For Each myProperty In properties textBox1.Text &= myProperty.Name & ControlChars.Cr Next myProperty End Sub 'MyPropertyCollection
private void MyPropertyCollection() { // Creates a new collection and assign it the properties for button1. PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1); // Displays each property in the collection in a text box. foreach (PropertyDescriptor myProperty in properties) textBox1.Text += myProperty.Name + '\n'; }
private: void MyPropertyCollection() { // Creates a new collection and assign it the properties for button1. PropertyDescriptorCollection^ properties = TypeDescriptor::GetProperties( button1 ); // Displays each property in the collection in a text box. for each ( PropertyDescriptor^ myProperty in properties ) { textBox1->Text = String::Concat( textBox1->Text, myProperty->Name, "\n" ); } }
private void MyPropertyCollection() { // Creates a new collection and assign it the properties for button1. PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1); // Displays each property in the collection in a text box. for (int iCtr = 0; iCtr < properties.get_Count(); iCtr++) { PropertyDescriptor myProperty = properties.get_Item(iCtr); textBox1.set_Text(myProperty.get_Name() + '\n'); } } //MyPropertyCollection

System.ComponentModel.PropertyDescriptorCollection


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


PropertyDescriptorCollection コンストラクタ (PropertyDescriptor[], Boolean)
アセンブリ: System (system.dll 内)

Dim properties As PropertyDescriptor() Dim readOnly As Boolean Dim instance As New PropertyDescriptorCollection(properties, readOnly)
public PropertyDescriptorCollection ( PropertyDescriptor[] properties, bool readOnly )
public PropertyDescriptorCollection ( PropertyDescriptor[] properties, boolean readOnly )
public function PropertyDescriptorCollection ( properties : PropertyDescriptor[], readOnly : boolean )

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


PropertyDescriptorCollection コンストラクタ (PropertyDescriptor[])
アセンブリ: System (system.dll 内)

Public Sub New ( _ properties As PropertyDescriptor() _ )
Dim properties As PropertyDescriptor() Dim instance As New PropertyDescriptorCollection(properties)
public PropertyDescriptorCollection ( PropertyDescriptor[] properties )
public: PropertyDescriptorCollection ( array<PropertyDescriptor^>^ properties )
public PropertyDescriptorCollection ( PropertyDescriptor[] properties )
public function PropertyDescriptorCollection ( properties : PropertyDescriptor[] )

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


PropertyDescriptorCollection コンストラクタ

名前 | 説明 |
---|---|
PropertyDescriptorCollection (PropertyDescriptor[]) | PropertyDescriptorCollection クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
PropertyDescriptorCollection (PropertyDescriptor[], Boolean) | オプションで読み取り専用にできる PropertyDescriptorCollection クラスの新しい空のインスタンスを初期化します。 |

PropertyDescriptorCollection フィールド


関連項目
PropertyDescriptorCollection クラスSystem.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor
PropertyDescriptorCollection プロパティ



関連項目
PropertyDescriptorCollection クラスSystem.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor
PropertyDescriptorCollection メソッド

名前 | 説明 | |
---|---|---|
![]() | Add | 指定した PropertyDescriptor をコレクションに追加します。 |
![]() | Clear | コレクションからすべての PropertyDescriptor オブジェクトを削除します。 |
![]() | Contains | 指定した PropertyDescriptor がコレクションに格納されているかどうかを示す値を返します。 |
![]() | CopyTo | 指定したインデックス番号を開始位置として、配列にコレクション全体をコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | Find | 大文字と小文字の違いを無視するかどうかを示すブール値を使用して、指定した名前の PropertyDescriptor を返します。 |
![]() | GetEnumerator | クラスの列挙子を返します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IndexOf | 指定した PropertyDescriptor のインデックスを返します。 |
![]() | Insert | コレクション内の指定したインデックス番号の位置に PropertyDescriptor を追加します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | Remove | 指定した PropertyDescriptor をコレクションから削除します。 |
![]() | RemoveAt | 指定したインデックス位置にある PropertyDescriptor をコレクションから削除します。 |
![]() | Sort | オーバーロードされます。 このコレクションのメンバを並べ替えます。 |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | InternalSort | オーバーロードされます。 このコレクションのメンバを並べ替えます。 |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.IDictionary.Add | 指定したキーおよび値を持つ要素を IDictionary に追加します。 |
![]() | System.Collections.IDictionary.Clear | IDictionary からすべての要素を削除します。 |
![]() | System.Collections.IDictionary.Contains | 指定したキーの要素が IDictionary に格納されているかどうかを確認します。 |
![]() | System.Collections.IDictionary.GetEnumerator | クラスの列挙子を返します。 |
![]() | System.Collections.IDictionary.Remove | 指定したキーを持つ要素を IDictionary から削除します。 |
![]() | System.Collections.IEnumerable.GetEnumerator | IDictionary の IEnumerator を返します。 |
![]() | System.Collections.IList.Add | IList に項目を追加します。 |
![]() | System.Collections.IList.Clear | コレクションからすべての項目を削除します。 |
![]() | System.Collections.IList.Contains | コレクションに特定の値が格納されているかどうかを判断します。 |
![]() | System.Collections.IList.IndexOf | コレクション内で指定した項目のインデックスを調べます。 |
![]() | System.Collections.IList.Insert | コレクション内の指定したインデックスの位置に項目を挿入します。 |
![]() | System.Collections.IList.Remove | 最初に出現する指定値をコレクションから削除します。 |
![]() | System.Collections.IList.RemoveAt | 指定したインデックスにある項目を削除します。 |

関連項目
PropertyDescriptorCollection クラスSystem.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor
PropertyDescriptorCollection メンバ
PropertyDescriptor オブジェクトのコレクションを表します。
PropertyDescriptorCollection データ型で公開されるメンバを以下の表に示します。




名前 | 説明 | |
---|---|---|
![]() | Add | 指定した PropertyDescriptor をコレクションに追加します。 |
![]() | Clear | コレクションからすべての PropertyDescriptor オブジェクトを削除します。 |
![]() | Contains | 指定した PropertyDescriptor がコレクションに格納されているかどうかを示す値を返します。 |
![]() | CopyTo | 指定したインデックス番号を開始位置として、配列にコレクション全体をコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | Find | 大文字と小文字の違いを無視するかどうかを示すブール値を使用して、指定した名前の PropertyDescriptor を返します。 |
![]() | GetEnumerator | クラスの列挙子を返します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IndexOf | 指定した PropertyDescriptor のインデックスを返します。 |
![]() | Insert | コレクション内の指定したインデックス番号の位置に PropertyDescriptor を追加します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | Remove | 指定した PropertyDescriptor をコレクションから削除します。 |
![]() | RemoveAt | 指定したインデックス位置にある PropertyDescriptor をコレクションから削除します。 |
![]() | Sort | オーバーロードされます。 このコレクションのメンバを並べ替えます。 |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | InternalSort | オーバーロードされます。 このコレクションのメンバを並べ替えます。 |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.IDictionary.Add | 指定したキーおよび値を持つ要素を IDictionary に追加します。 |
![]() | System.Collections.IDictionary.Clear | IDictionary からすべての要素を削除します。 |
![]() | System.Collections.IDictionary.Contains | 指定したキーの要素が IDictionary に格納されているかどうかを確認します。 |
![]() | System.Collections.IDictionary.GetEnumerator | クラスの列挙子を返します。 |
![]() | System.Collections.IDictionary.Remove | 指定したキーを持つ要素を IDictionary から削除します。 |
![]() | System.Collections.IEnumerable.GetEnumerator | IDictionary の IEnumerator を返します。 |
![]() | System.Collections.IList.Add | IList に項目を追加します。 |
![]() | System.Collections.IList.Clear | コレクションからすべての項目を削除します。 |
![]() | System.Collections.IList.Contains | コレクションに特定の値が格納されているかどうかを判断します。 |
![]() | System.Collections.IList.IndexOf | コレクション内で指定した項目のインデックスを調べます。 |
![]() | System.Collections.IList.Insert | コレクション内の指定したインデックスの位置に項目を挿入します。 |
![]() | System.Collections.IList.Remove | 最初に出現する指定値をコレクションから削除します。 |
![]() | System.Collections.IList.RemoveAt | 指定したインデックスにある項目を削除します。 |
![]() | System.Collections.IList.Item | コレクション内の指定したインデックス位置の項目を取得または設定します。 |

関連項目
PropertyDescriptorCollection クラスSystem.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor
- PropertyDescriptorCollectionのページへのリンク