How do I convert IEnumerable into Dictionary?

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
Hi Guys,
I have a linq statement that returns some objects from a Dictionary<MyObjectClass,int>:
IEnumerable<KeyValuePair<Category,int>> sortedAmtOfMediaClipsInEachCategory =<br/>
from entry in AmtOfMediaClipsInEachCategory<br/>
orderby entry.Value ascending<br/>
select entry;
I want to then put the sortedAmtOfMediaClipsInEachCategory back into the dictionary AmtOfMediaClipsInEachCategory now that I have sorted it with linq. I cant work out the syntax to do this though. Would anybody be able to help?
Regards
Peter


View the full article
 
Back
Top