Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# remove duplicates from datatable

private DataTable GetDistinct(DataTable dt)
{
    var UniqueRows = dt.AsEnumerable().Distinct(DataRowComparer.Default);
    DataTable dt2 = UniqueRows.CopyToDataTable();
    return dt2;
}
 
PREVIOUS NEXT
Tagged: #remove #duplicates #datatable
ADD COMMENT
Topic
Name
4+5 =