赞
踩
- //这个是集合
- Dictionary<int, string> list = new Dictionary<int, string>();
- //升序
- Dictionary<int, string> dic_asc = list.OrderBy(p => p.Key).ToDictionary(p => p.Key, o => o.Value);
- //降序
- Dictionary<int, string> dic_desc = list.OrderByDescending(p => p.Key).ToDictionary(p => p.Key, o => o.Value);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。