CustomTypeDescriptor.GetEvents 方法

定義

傳回這個型別描述項所表示之物件的事件描述項集合。

多載

GetEvents()

傳回這個型別描述項所表示之物件的事件描述項集合。

GetEvents(Attribute[])

傳回這個型別描述項所表示之物件的已篩選事件描述項集合。

備註

方法 GetEvents 會傳回這個類型描述元所表示之物件的事件描述元集合。 您可以提供選擇性的屬性陣列來篩選傳回的集合。 如果未提供父代,方法會傳回 Empty

GetEvents()

來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs

傳回這個型別描述項所表示之物件的事件描述項集合。

public:
 virtual System::ComponentModel::EventDescriptorCollection ^ GetEvents();
public virtual System.ComponentModel.EventDescriptorCollection GetEvents ();
abstract member GetEvents : unit -> System.ComponentModel.EventDescriptorCollection
override this.GetEvents : unit -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function GetEvents () As EventDescriptorCollection

傳回

EventDescriptorCollection,包含這個型別描述項所描述之物件的事件描述項。 預設為 Empty

實作

備註

如果父自定義型別描述元已傳遞至 CustomTypeDescriptor 建構函式,則 GetEvents 方法會呼叫父系的對應方法。

另請參閱

適用於

GetEvents(Attribute[])

來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs

傳回這個型別描述項所表示之物件的已篩選事件描述項集合。

public:
 virtual System::ComponentModel::EventDescriptorCollection ^ GetEvents(cli::array <Attribute ^> ^ attributes);
public virtual System.ComponentModel.EventDescriptorCollection GetEvents (Attribute[] attributes);
public virtual System.ComponentModel.EventDescriptorCollection GetEvents (Attribute[]? attributes);
abstract member GetEvents : Attribute[] -> System.ComponentModel.EventDescriptorCollection
override this.GetEvents : Attribute[] -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function GetEvents (attributes As Attribute()) As EventDescriptorCollection

參數

attributes
Attribute[]

當做篩選條件之型別的陣列。 這可以是 null

傳回

EventDescriptorCollection,包含這個型別描述項所描述之物件的事件描述項。 預設為 Empty

實作

備註

您可以使用 attributes 參數來篩選傳回的集合。

如果父自定義型別描述元已傳遞至 CustomTypeDescriptor 建構函式,則 GetEvents 方法會呼叫父系的對應方法。

另請參閱

適用於