NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PropertyDescriptorCollection.Find

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;

Parameters

name
The name of the property to get from the collection.
ignoreCase
true if you want to ignore the case of the event; otherwise, false.

Return Value

A PropertyDescriptor with the specified name, or a null reference (in Visual Basic Nothing) if the property does not exist.

Example [Visual Basic]

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

See Also

PropertyDescriptorCollection Class | PropertyDescriptorCollection Members | System.ComponentModel Namespace | PropertyDescriptor | TypeDescriptor