EventHandlerList EventHandlerList EventHandlerList EventHandlerList Class

Definition

Provides a simple list of delegates. This class cannot be inherited.

public ref class EventHandlerList sealed : IDisposable
public sealed class EventHandlerList : IDisposable
type EventHandlerList = class
    interface IDisposable
Public NotInheritable Class EventHandlerList
Implements IDisposable
Inheritance
EventHandlerListEventHandlerListEventHandlerListEventHandlerList
Implements

Examples

For an example of using an EventHandlerList, see How to: Handle Multiple Events Using Event Properties.

Remarks

This class uses a linear search algorithm to find entries in the list of delegates. A linear search algorithm is inefficient when working with a large number of entries. Therefore, when you have a large list, finding entries is slow.

Constructors

EventHandlerList() EventHandlerList() EventHandlerList() EventHandlerList()

Initializes a new instance of the EventHandlerList class.

Properties

Item[Object] Item[Object] Item[Object] Item[Object]

Gets or sets the delegate for the specified object.

Methods

AddHandler(Object, Delegate) AddHandler(Object, Delegate) AddHandler(Object, Delegate) AddHandler(Object, Delegate)

Adds a delegate to the list.

AddHandlers(EventHandlerList) AddHandlers(EventHandlerList) AddHandlers(EventHandlerList) AddHandlers(EventHandlerList)

Adds a list of delegates to the current list.

Dispose() Dispose() Dispose() Dispose()

Disposes the delegate list.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveHandler(Object, Delegate) RemoveHandler(Object, Delegate) RemoveHandler(Object, Delegate) RemoveHandler(Object, Delegate)

Removes a delegate from the list.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to