resdata.data为数据源 r.Code 为某个字段
var result2 = from r in resdata.data group r by r.Code into g where g.Count() > 1 select g;通过分组我们可以得到分组后的数据,随记。