How to convert IEnumerable to ObservableCollection?

As per the MSDN

var myObservableCollection = new ObservableCollection<YourType>(myIEnumerable);

This will make a shallow copy of the current IEnumerable and turn it in to a ObservableCollection.

Leave a Comment