//DataTable以列分组 var result = from r in dt.AsEnumerable() group r by new { a = r.Field<string>(), b = r.Field<string>() } into g select new { key = g.Key, count = g.Count() }; var s = result.ToList();