EventDescriptor.AddEventHandler Method (Object, Delegate)

 

When overridden in a derived class, binds the event to the component.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public abstract void AddEventHandler(
	object component,
	Delegate value
)

Parameters

component
Type: System.Object

A component that provides events to the delegate.

value
Type: System.Delegate

A delegate that represents the method that handles the event.

Typically, this method is implemented through reflection. For more information about reflection, see the topics in Reflection in the .NET Framework.

For more information about delegates, see NIB: Events and Delegates.

Notes to Inheritors:

When you override this method, it should add the delegate to the component's event list by invoking the appropriate add_myHandler method.

.NET Framework
Available since 1.1
Return to top
Show: