Gets the description of the property with the specified name.
[Visual Basic] Overridable Public Function Find( _ ByVal name As String, _ ByVal ignoreCase As Boolean _ ) As PropertyDescriptor [C#] public virtual PropertyDescriptor Find( string name, bool ignoreCase ); [C++] public: virtual PropertyDescriptor* Find( String* name, bool ignoreCase ); [JScript] public function Find( name : String, ignoreCase : Boolean ) : PropertyDescriptor;
A PropertyDescriptor with the specified name, or a null reference (in Visual Basic Nothing) if the property does not exist.
The following example finds a specific PropertyDescriptor. It prints the type of component for this PropertyDescriptor in a text box. It assumes that Button1 has been instantiated on a form.
[Visual Basic]
Private Sub FindProperty() Dim properties As PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(Button1) ' Set a PropertyDescriptor to the specific event. Dim myProperty As PropertyDescriptor myProperty = properties.Find("Opacity", False) ' Print the type of component for the property. TextBox1.Text = myProperty.ComponentType.ToString End Sub
PropertyDescriptorCollection Class | PropertyDescriptorCollection Members | System.ComponentModel Namespace | PropertyDescriptor | TypeDescriptor