System.Runtime.InteropServices._EventInfo.AddEventHandler Method

Provides COM objects with version-independent access to the System.Reflection.EventInfo.AddEventHandler(object, Delegate) method.

Syntax

public void AddEventHandler (object target, Delegate handler)

Parameters

target
The event source.
handler
A method or methods to be invoked when the event is raised by the target.

Remarks

This method is for access to managed classes from unmanaged code and should not be called from managed code.

The System.Reflection.EventInfo.AddEventHandler(object, Delegate) method adds an event handler to an event source.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0