Επεξεργασία

Κοινή χρήση μέσω


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
EventHandlerList
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()

Initializes a new instance of the EventHandlerList class.

Properties

Item[Object]

Gets or sets the delegate for the specified object.

Methods

AddHandler(Object, Delegate)

Adds a delegate to the list.

AddHandlers(EventHandlerList)

Adds a list of delegates to the current list.

Dispose()

Disposes the delegate list.

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveHandler(Object, Delegate)

Removes a delegate from the list.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to