Reputation: 244
SortedList<string, object> testIds = new SortedList<string, object>();
Can I get SortedList type of collection after sort in descending order? For example :
SortedList<string, object> SortedTestIds = testIds.OrderByDescending(t=>t.Key);
or some other cases.
Upvotes: 0
Views: 70
Reputation: 7601
you have to use the var
like
var SortedTestIds = testIds.OrderByDescending(t => t.Key);
or if you want SortedList then you have to use IComparer
for your own Comparer.
here you can find it Click here
Upvotes: 1