It’s been long time for my blog with technical posts. So, today, I decided to write on “Remove duplicate datarows in datatable” before I start on Entity Framework 4.1, Azure and Silverlight 4.
DataTable dt = getDataTable();
dt = dt.AsEnumerable().Distinct(DataRowComparer.Default).CopyToDataTable();
Now you’re done.
You can check row count before removing duplicates.