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!

EventDescriptorCollection.Find

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;

Parameters

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

Return Value

The EventDescriptor with the specified name, or a null reference (in Visual Basic Nothing) if the event does not exist.

Example [Visual Basic]

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

See Also

EventDescriptorCollection Class | EventDescriptorCollection Members | System.ComponentModel Namespace | EventDescriptor | TypeDescriptor