C# DataTable 获取去重后的数据

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

这样获取的是保留fieldNames列的表数据