PropertyDescriptorCollection.Find メソッド
アセンブリ: 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)
戻り値
指定した名前の PropertyDescriptor。そのようなプロパティが存在しない場合は null 参照 (Visual Basic では Nothing)。

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

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からPropertyDescriptorCollection.Find メソッドを検索する場合は、下記のリンクをクリックしてください。

- PropertyDescriptorCollection.Find メソッドのページへのリンク