Reversing an ObservableCollection<objectType> using linq
c#, linq, observablecollection, reverse, windows-phone-7
Solution
Reverse returns an IEnumerable, it does not modify the collection. To modify the collection you could do
collection = new ObservableCollection<YourType>(collection.Reverse());
Problem
This one should be easy, and im ashamed i havent figured it out myself yet. I'm trying to reverse the order of a list of items in my wp7 app. The list is an ObservableCollection. When using system.linq, intellisense lets me do this: myList.Reverse(); ,but this doesnt seem to work. Am i doing something wrong, or is there some other way i can do this easily? Thanks in advance.