ObservableCollectionnames = new ObservableCollection ();
names.Add("John"); names.Add("Mary");
names.Remove("John");
names.CollectionChanged += Names_CollectionChanged; private void Names_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { // Handle the collection change event here }These examples demonstrate how to create an ObservableCollection object, add and remove items from it, and subscribe to its CollectionChanged event. The System.Collections.ObjectModel namespace is part of the .NET Framework Base Class Library, which is included in the System.dll assembly.