VirtualTypeImplementor.AddEventHandler(EventInfo, Object, Delegate) Method

Definition

Adds the given delegate to the given event.

public:
 virtual void AddEventHandler(System::Reflection::EventInfo ^ eventInfo, System::Object ^ instance, Delegate ^ handler);
public virtual void AddEventHandler (System.Reflection.EventInfo eventInfo, object instance, Delegate handler);
abstract member AddEventHandler : System.Reflection.EventInfo * obj * Delegate -> unit
override this.AddEventHandler : System.Reflection.EventInfo * obj * Delegate -> unit
Public Overridable Sub AddEventHandler (eventInfo As EventInfo, instance As Object, handler As Delegate)

Parameters

eventInfo
EventInfo

The event to add the handler to.

instance
Object

The instance on which to add the event handler. This may be null if the event is static.

handler
Delegate

The event handler to add.

Exceptions

If non-abstract derived class did not provide an implementation by overriding this method.

Applies to