Reputation: 10271
What is the most efficient way to convert a
System.Collections.Generic.SortedList<string,Contact>
into a
IEnumerable<Contact>
The consumer of IEnumerable is an MVC view which will want to display the items in the order in which they were stored in System.Collections.Generic.SortedList
Upvotes: 1
Views: 747
Reputation: 5023
SortedList.Values
or SortedList.GetValueList
(only in the non-generic version) is just what you need.
Upvotes: 7