PropertyDescriptorCollection.Find メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PropertyDescriptorCollection.Find メソッドの意味・解説 

PropertyDescriptorCollection.Find メソッド

大文字と小文字違い無視するかどうかを示すブール値を使用して指定した名前の PropertyDescriptor返します

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

Public Overridable Function
 Find ( _
    name As String, _
    ignoreCase As Boolean _
) As PropertyDescriptor
Dim instance As PropertyDescriptorCollection
Dim name As String
Dim ignoreCase As Boolean
Dim returnValue As PropertyDescriptor

returnValue = instance.Find(name, ignoreCase)
public virtual PropertyDescriptor Find (
    string name,
    bool ignoreCase
)
public:
virtual PropertyDescriptor^ Find (
    String^ name, 
    bool ignoreCase
)
public PropertyDescriptor Find (
    String name, 
    boolean ignoreCase
)
public function Find (
    name : String, 
    ignoreCase : boolean
) : PropertyDescriptor

パラメータ

name

コレクションから返す PropertyDescriptor の名前。

ignoreCase

プロパティ名の大文字と小文字区別しない場合trueそれ以外場合false

戻り値
指定した名前の PropertyDescriptorそのようなプロパティ存在しない場合null 参照 (Visual Basic では Nothing)。

使用例使用例

特定の PropertyDescriptor検索するコード例次に示します見つかった PropertyDescriptorコンポーネントの型をテキスト ボックス出力します。この例では、button1textBox1フォーム上でインスタンス化されていることが必要です。

Private Sub FindProperty()
    ' Creates a new collection and assign it the properties for button1.
    Dim properties As PropertyDescriptorCollection
 = _
       TypeDescriptor.GetProperties(button1)
       
    ' Sets a PropertyDescriptor to the specific property.
    Dim myProperty As PropertyDescriptor =
 properties.Find("Opacity", False)
       
    ' Prints the property and the property description.
    textBox1.Text = myProperty.DisplayName & _
       Microsoft.VisualBasic.ControlChars.Cr & myProperty.Description
End Sub

private void FindProperty() {
   // Creates a new collection and assign it the properties for button1.
   PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1);

   // Sets a PropertyDescriptor to the specific property.
   PropertyDescriptor myProperty = properties.Find("Opacity", false);

   // Prints the property and the property description.
   textBox1.Text = myProperty.DisplayName + '\n' + myProperty.Description;
}

private:
   void FindProperty()
   {
      // Creates a new collection and assign it the properties for button1.
      PropertyDescriptorCollection^ properties = TypeDescriptor::GetProperties( button1
 );
      
      // Sets a PropertyDescriptor to the specific property.
      PropertyDescriptor^ myProperty = properties->Find( "Opacity",
 false );
      
      // Prints the property and the property description.
      textBox1->Text = myProperty->DisplayName + "\n" + myProperty->Description;
   }
private void FindProperty()
{
    // Creates a new collection and assign it the properties for button1.
    PropertyDescriptorCollection properties = 
        TypeDescriptor.GetProperties(button1);

    // Sets a PropertyDescriptor to the specific property.
    PropertyDescriptor myProperty = properties.Find("Opacity", false);

    // Prints the property and the property description.
    textBox1.set_Text(myProperty.get_DisplayName() + '\n' 
        + myProperty.get_Description());
} //FindProperty
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PropertyDescriptorCollection クラス
PropertyDescriptorCollection メンバ
System.ComponentModel 名前空間
PropertyDescriptor クラス
TypeDescriptor


このページでは「.NET Framework クラス ライブラリ リファレンス」からPropertyDescriptorCollection.Find メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からPropertyDescriptorCollection.Find メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からPropertyDescriptorCollection.Find メソッド を検索

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

辞書ショートカット

すべての辞書の索引

PropertyDescriptorCollection.Find メソッドのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS