EventHandlerList Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
For an example of using an EventHandlerList, see How to: Handle Multiple Events Using Event Properties.
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.
Event |
Initializes a new instance of the EventHandlerList class. |
Item[Object] |
Gets or sets the delegate for the specified object. |
Add |
Adds a delegate to the list. |
Add |
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) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Remove |
Removes a delegate from the list. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: