System.ComponentModel.CollectionChangeEventHandler Delegate

Assembly: System.dll
Namespace: System.ComponentModel
Summary
Represents the method that handles the DataColumnCollection.CollectionChanged event raised when adding elements to or removing elements from a collection.
C# Syntax:
[Serializable]
public delegate void CollectionChangeEventHandler(object sender, CollectionChangeEventArgs e);
Parameters:
The declaration of your event handler must have the same parameters as the CollectionChangeEventHandler delegate declaration.

sender

The source of the event.

e

A CollectionChangeEventArgs that contains the event data.

Remarks
When you create a CollectionChangeEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see the conceptual topic at MSDN: eventsdelegates.
Example
For an example of using the CollectionChangeEventHandler delegate, see the sample code in the DataColumnCollection.CollectionChanged event of the DataColumnCollection class.
See also:
System.ComponentModel Namespace | CollectionChangeEventArgs | CollectionChangeAction

Hierarchy:

Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.