The difference between a generic list List<T> and an observable collection ObservableCollection<T> is that observable collection includes an interface called “INotifyCollectionChanged“.
Another difference lies in databinding.
While setting ItemsSource property of some controls (e.g. datagrid or itemscollection) to every IEnumerable, there is no notification service applied.
But if we bind it to an ObservableCollection, any change in the list is recognized by the control
Example: When a datagrid adds rows, then the observable collection its ItemsSource gets appended by an item.
From the documentation:
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.



















One Response
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Continuing the Discussion