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