EventHandlerList Classe
Definição
Fornece uma lista simples de delegados.Provides a simple list of delegates. Essa classe não pode ser herdada.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
- Herança
-
EventHandlerList
- Implementações
Exemplos
Para obter um exemplo de como usar um EventHandlerList , consulte como manipular vários eventos usando propriedades de evento.For an example of using an EventHandlerList, see How to: Handle Multiple Events Using Event Properties.
Comentários
Essa classe usa um algoritmo de pesquisa linear para localizar entradas na lista de delegados.This class uses a linear search algorithm to find entries in the list of delegates. Um algoritmo de pesquisa linear é ineficiente ao trabalhar com um grande número de entradas.A linear search algorithm is inefficient when working with a large number of entries. Portanto, quando você tem uma lista grande, encontrar entradas é lenta.Therefore, when you have a large list, finding entries is slow.
Construtores
| EventHandlerList() |
Inicializa uma nova instância da classe EventHandlerList.Initializes a new instance of the EventHandlerList class. |
Propriedades
| Item[Object] |
Obtém ou define o delegado para o objeto especificado.Gets or sets the delegate for the specified object. |
Métodos
| AddHandler(Object, Delegate) |
Adiciona um delegado à lista.Adds a delegate to the list. |
| AddHandlers(EventHandlerList) |
Adiciona uma lista de delegados à lista atual.Adds a list of delegates to the current list. |
| Dispose() |
Descarta a lista de delegados.Disposes the delegate list. |
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| RemoveHandler(Object, Delegate) |
Remove um delegado da lista.Removes a delegate from the list. |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |