datatable 如何去除重复行

2024-12-28 21:11:31
推荐回答(1个)
回答1:

public static DataTable Distinct(DataTable dt, string[] filedNames)
{
DataView dv = dt.DefaultView;
DataTable DistTable = dv.ToTable("Dist", true, filedNames);
return DistTable;
}