PropertyDescriptorCollectionとは? わかりやすく解説

PropertyDescriptorCollection クラス

PropertyDescriptor オブジェクトコレクション表します

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Public Class PropertyDescriptorCollection
    Implements IList, IDictionary, ICollection, IEnumerable
Dim instance As PropertyDescriptorCollection
public class PropertyDescriptorCollection :
 IList, IDictionary, ICollection, 
    IEnumerable
public ref class PropertyDescriptorCollection
 : IList, IDictionary, ICollection, 
    IEnumerable
public class PropertyDescriptorCollection implements
 IList, IDictionary, 
    ICollection, IEnumerable
public class PropertyDescriptorCollection implements
 IList, IDictionary, 
    ICollection, IEnumerable
解説解説
使用例使用例

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);

ボタンに関するすべてのプロパティテキスト ボックス出力する例を次に示します。この例では、button1textBox1フォーム上でインスタンス化されていることが必要です。

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.Object
  System.ComponentModel.PropertyDescriptorCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PropertyDescriptorCollection メンバ
System.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor

PropertyDescriptorCollection コンストラクタ (PropertyDescriptor[], Boolean)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

オプション読み取り専用にできる PropertyDescriptorCollection クラス新しい空のインスタンス初期化します。

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    properties As PropertyDescriptor(), _
    readOnly As Boolean
 _
)
Dim properties As PropertyDescriptor()
Dim readOnly As Boolean

Dim instance As New PropertyDescriptorCollection(properties,
 readOnly)
public PropertyDescriptorCollection (
    PropertyDescriptor[] properties,
    bool readOnly
)
public:
PropertyDescriptorCollection (
    array<PropertyDescriptor^>^ properties, 
    bool readOnly
)
public PropertyDescriptorCollection (
    PropertyDescriptor[] properties, 
    boolean readOnly
)
public function PropertyDescriptorCollection
 (
    properties : PropertyDescriptor[], 
    readOnly : boolean
)

パラメータ

properties

コレクションプロパティ提供する PropertyDescriptor 型の配列

readOnly

true場合コレクション変更できません。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PropertyDescriptorCollection クラス
PropertyDescriptorCollection メンバ
System.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor

PropertyDescriptorCollection コンストラクタ (PropertyDescriptor[])

PropertyDescriptorCollection クラス新しインスタンス初期化します。

名前空間: System.ComponentModel
アセンブリ: 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[]
)

パラメータ

properties

コレクションプロパティ提供する PropertyDescriptor 型の配列

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PropertyDescriptorCollection クラス
PropertyDescriptorCollection メンバ
System.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor
PropertyDescriptor クラス
TypeDescriptor

PropertyDescriptorCollection コンストラクタ

PropertyDescriptorCollection クラス新しインスタンス初期化します。 PropertyDescriptor TypeDescriptor
オーバーロードの一覧オーバーロードの一覧

名前 説明
PropertyDescriptorCollection (PropertyDescriptor[]) PropertyDescriptorCollection クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

PropertyDescriptorCollection (PropertyDescriptor[], Boolean) オプション読み取り専用にできる PropertyDescriptorCollection クラス新しい空のインスタンス初期化します。
参照参照

関連項目

PropertyDescriptorCollection クラス
PropertyDescriptorCollection メンバ
System.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor
PropertyDescriptor クラス
TypeDescriptor

PropertyDescriptorCollection フィールド


PropertyDescriptorCollection プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Item オーバーロードされます指定した PropertyDescriptor を取得または設定します
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.IList.Item コレクション内の指定したインデックス位置の項目を取得または設定します
参照参照

関連項目

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 から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 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 データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド PropertyDescriptorCollection オーバーロードされます。 PropertyDescriptorCollection クラス新しインスタンス初期化します。
パブリック フィールドパブリック フィールド
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Item オーバーロードされます指定した PropertyDescriptor取得または設定します
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド 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 から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 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



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「PropertyDescriptorCollection」の関連用語

PropertyDescriptorCollectionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PropertyDescriptorCollectionのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS