-
Book Overview & Buying
-
Table Of Contents
.NET 4.0 Generics Beginner's Guide
By :
The preceding two changes don't care about the data already in the collection. So, if any of the elements in the collection changes, that's a data sensitive change. The physical layout of the collection doesn't change.
For example, assume that you want to monitor the weather for several locations. If any of the weather properties (such as temperature, humidity) changes in any of these locations, you want to update that detail. This is a typical scenario of a data sensitive operation.
Ok, so how do we handle these changes?
.NET 4.0 came up with an excellent way to deal with these types of changes. With .NET 4.0, a new type of generic collection, ObservableCollection, was introduced. This collection is a change-aware collection. So, whenever any change happens, this collection can report it.
The ObservableCollection<T> class implements two interfaces:
1. INotifyCollectionChanged
2. INotifyPropertyChanged
Both of these interfaces are very simple. Both of them only...
Change the font size
Change margin width
Change background colour