转换 System.Collections.Generic.SortedList;进入 IEnumerable
最有效方法是什么
System.Collections.Generic.SortedList<string,Contact>
将 a 转换为 a 的
IEnumerable<Contact>
IEnumerable 的使用者是一个 MVC 视图,它希望按照 System.Collections.Generic.SortedList 中存储的顺序显示项目
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SortedList.Values
或SortedList.GetValueList
(仅在非通用版本中)正是您所需要的。SortedList.Values
orSortedList.GetValueList
(only in the non-generic version) is just what you need.