_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);
本文共 236 字,大约阅读时间需要 1 分钟。
_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);
转载于:https://www.cnblogs.com/XuPengLB/p/5856483.html