CustomTypeDescriptor.GetEvents Method (Attribute[])


Returns a filtered collection of event descriptors for the object represented by this type descriptor.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public virtual EventDescriptorCollection GetEvents(
	Attribute[] attributes


Type: System.Attribute[]

An array of attributes to use as a filter. This can be null.

Return Value

Type: System.ComponentModel.EventDescriptorCollection

An EventDescriptorCollection containing the event descriptions for the object represented by this type descriptor. The default is Empty.

You can use the attributes parameter to filter the collection that is returned.

If a parent custom type descriptor was passed into the CustomTypeDescriptor constructor, the GetEvents method will call the parent's corresponding method.

.NET Framework
Available since 2.0
Return to top