| Visual Basic (Declaration) | |
|---|---|
Public Event CollectionChanged As NotifyCollectionChangedEventHandler  | |
| Visual Basic (Usage) |  Copy Code | 
|---|---|
Dim instance As RelatedEntityList(Of T) Dim handler As NotifyCollectionChangedEventHandler AddHandler instance.CollectionChanged, handler  | |
| C# | |
|---|---|
public event NotifyCollectionChangedEventHandler CollectionChanged  | |
| C++/CLI | |
|---|---|
public: event NotifyCollectionChangedEventHandler^ CollectionChanged  | |
The event handler receives an argument of type NotifyCollectionChangedEventArgs containing data related to this event. The following NotifyCollectionChangedEventArgs properties provide information specific to this event.
| Property | Description | 
|---|---|
| Action | Gets the action that caused the event. | 
| NewItems | Gets the list of new items involved in the change. | 
| NewStartingIndex | Gets the index at which the change occurred. | 
| OldItems | Gets the list of items affected by a System.Collections.Specialized.NotifyCollectionChangedAction.Replace, Remove, or Move action. | 
| OldStartingIndex | Gets the index at which a System.Collections.Specialized.NotifyCollectionChangedAction.Move, Remove, or Replace action occurred. | 
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family