ערוך

שתף באמצעות


EnumBuilder.GetEvent(String, BindingFlags) Method

Definition

Returns the event with the specified name.

public:
 override System::Reflection::EventInfo ^ GetEvent(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.EventInfo? GetEvent (string name, System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.EventInfo GetEvent (string name, System.Reflection.BindingFlags bindingAttr);
override this.GetEvent : string * System.Reflection.BindingFlags -> System.Reflection.EventInfo
Public Overrides Function GetEvent (name As String, bindingAttr As BindingFlags) As EventInfo

Parameters

name
String

The name of the event to get.

bindingAttr
BindingFlags

This invocation attribute. This must be a bit flag from BindingFlags : InvokeMethod, NonPublic, and so on.

Returns

Returns an EventInfo object representing the event declared or inherited by this type with the specified name. If there are no matches, null is returned.

Exceptions

This method is not currently supported in types that are not complete.

Remarks

As a workaround, to retrieve the event of a finished type, retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

Applies to