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
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