Is there a way to do this without iterating through the List and adding the items to the ObservableCollection?
Vb.net – How to convert a List(Of T) to an ObservableCollection(Of T) in VB.NET
collectionslistvb.net
Related Question
- Python – Finding the index of an item in a list
- Python – the difference between Python’s list methods append and extend
- Python – How to randomly select an item from a list
- Python – How to split a list into evenly sized chunks
- Python – Accessing the index in ‘for’ loops
- Python – How to make a flat list out of a list of lists
- Java – Initialization of an ArrayList in one line
- Python – List changes unexpectedly after assignment. Why is this and how can I prevent it
Best Solution
No, there is no way to directly convert the list to an observable collection. You must add each item to the collection. However, below is a shortcut to allow the framework to enumerate the values and add them for you.