标签:
_dic = _dic.OrderByDescending(x => x.Value).ToDictionary(x=>x.Key,x=>x.Value); var Num = _dic.ToList().Take(5).Select(a => a.Key.ToString()).ToArray(); var Str = string.Join(",", Num);
Linq排序,获取前5条数据
原文地址:http://www.cnblogs.com/XuPengLB/p/5856483.html