Redigeeri

Jagamisviis:


TypeBuilder.GetEvents Method

Definition

Returns the events defined by the current TypeBuilder.

Overloads

GetEvents()

Returns the public events declared or inherited by this type.

GetEvents(BindingFlags)

Returns the public and non-public events that are declared by this type.

GetEvents()

Source:
TypeBuilder.cs

Returns the public events declared or inherited by this type.

public:
 override cli::array <System::Reflection::EventInfo ^> ^ GetEvents();
public override System.Reflection.EventInfo[] GetEvents ();
override this.GetEvents : unit -> System.Reflection.EventInfo[]
Public Overrides Function GetEvents () As EventInfo()

Returns

Returns an array of EventInfo objects representing the public events declared or inherited by this type. An empty array is returned if there are no public events.

Exceptions

This method is not implemented for incomplete types.

Remarks

Retrieve the type using GetType or GetType and use reflection on the retrieved type.

Applies to

GetEvents(BindingFlags)

Source:
TypeBuilder.cs

Returns the public and non-public events that are declared by this type.

public:
 override cli::array <System::Reflection::EventInfo ^> ^ GetEvents(System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.EventInfo[] GetEvents (System.Reflection.BindingFlags bindingAttr);
override this.GetEvents : System.Reflection.BindingFlags -> System.Reflection.EventInfo[]
Public Overrides Function GetEvents (bindingAttr As BindingFlags) As EventInfo()

Parameters

bindingAttr
BindingFlags

A bitwise combination of BindingFlags values that limits the search.

Returns

Returns an array of EventInfo objects representing the events declared or inherited by this type that match the specified binding flags. An empty array is returned if there are no matching events.

Exceptions

This method is not implemented for incomplete types.

Remarks

Retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

Applies to