Converting ObservableCollection to List?
Depending on the type of object in the ObservableCollection
... I'll assume it's an int
for this example:
IEnumerable<int> obsCollection = (IEnumerable<int>)GetCollection();
var list = new List<int>(obsCollection);
Just need to add the namespace using System.Linq;
and use the method ToList()
in the ObservableCollection object