CollectionChangeEventHandler CollectionChangeEventHandler CollectionChangeEventHandler CollectionChangeEventHandler Delegate

Definition

Representa el método que controla el evento CollectionChanged que se produce al agregar elementos a una colección o quitar elementos de una colección. Represents the method that handles the CollectionChanged event raised when adding elements to or removing elements from a collection.

public delegate void CollectionChangeEventHandler(System::Object ^ sender, CollectionChangeEventArgs ^ e);
public delegate void CollectionChangeEventHandler(object sender, CollectionChangeEventArgs e);
type CollectionChangeEventHandler = delegate of obj * CollectionChangeEventArgs -> unit
Public Delegate Sub CollectionChangeEventHandler(sender As Object, e As CollectionChangeEventArgs)

Parámetros

sender
Object Object Object Object

Origen del evento. The source of the event.

Inheritance
CollectionChangeEventHandlerCollectionChangeEventHandlerCollectionChangeEventHandlerCollectionChangeEventHandler

Examples

Para obtener un ejemplo del uso de la CollectionChangeEventHandler delegado, vea el código de ejemplo en el CollectionChanged eventos de la DataColumnCollection clase.For an example of using the CollectionChangeEventHandler delegate, see the sample code in the CollectionChanged event of the DataColumnCollection class.

Remarks

Cuando se crea un delegado CollectionChangeEventHandler, se identifica el método que controlará el evento.When you create a CollectionChangeEventHandler delegate, you identify the method that will handle the event. Para asociar el evento al controlador, se debe agregar una instancia del delegado al evento.To associate the event with your event handler, add an instance of the delegate to the event. Siempre que se produce el evento, se llama a su controlador, a menos que se quite el delegado.The event handler is called whenever the event occurs, unless you remove the delegate. Para obtener más información sobre los delegados de controlador de eventos, consulte controlar y provocar eventos.For more information about event handler delegates, see Handling and Raising Events.

Applies to

See Also