c# 对DataTable进行分组group by

mac2022-06-30  40

var resultGroupedByColumn = dt.Rows.Cast<DataRow>().GroupBy(r => r.ItemArray[0]);//对索引为0的一列进行分组,结果是集合

 

转载于:https://www.cnblogs.com/SeNaiTes/p/10332827.html

最新回复(0)