找出不同项
1 var query = List.GroupBy(o => o.id).Select(p => new { p.Key, count = p.Count() }).Where(p => p.count > 1).ToList();
1 resultMsg = string.Join(",", query.select(p=>p.key).ToList())
p.key).To..._.select(p => p.key.id)">
赞
踩
找出不同项
1 var query = List.GroupBy(o => o.id).Select(p => new { p.Key, count = p.Count() }).Where(p => p.count > 1).ToList();
1 resultMsg = string.Join(",", query.select(p=>p.key).ToList())
转载于:https://www.cnblogs.com/LiuFengH/p/10221182.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。