When implemented by a derived class, searches for events which are declared or inherited by the current Type, using the specified binding constraints.
[Visual Basic] Overloads MustOverride Public Function GetEvents( _ ByVal bindingAttr As BindingFlags _ ) As EventInfo () [C#] public abstract EventInfo[] GetEvents( BindingFlags bindingAttr ); [C++] public: virtual EventInfo* GetEvents( BindingFlags bindingAttr ) [] = 0; [JScript] public abstract function GetEvents( bindingAttr : BindingFlags ) : EventInfo[];
-or-
zero, to conduct a case-sensitive search for public events.
An array of EventInfo objects representing all events which are declared or inherited by the current Type that match the specified binding constraints.
-or-An empty array of type EventInfo, if the current Type does not have events, or if none of the events match the binding constraints.
Exception Type | Condition |
---|---|
SecurityException | The BindingFlags value Public is used but the caller does not have ReflectionPermission to reflect non-public members outside the current assembly. |
Abstract. This method must be implemented by a derived class.
The following BindingFlags filter flags can be used to define which events should be included in the search:
The following BindingFlags modifier flags can be used to change how the search works:
See BindingFlags for more information.
Type Class | Type Members | System Namespace | Type.GetEvents Overload List