I want to remove duplicates rows from one datatable to another datatable.
See below code.
Original data.
DataTable dt = new DataTable();
dt.Columns.Add("FirstName");
dt.Columns.Add("LastName");
dt.Columns.Add("Quality");
dt.Rows.Add("Tom", "Sushi", "ABC");
dt.Rows.Add("Skizo", "Oxford", "XYZ");
dt.Rows.Add("Tom", "Sushi", "ABC");
dt.Rows.Add("Kim", "Naidoo", "AWR");
dt.Rows.Add("Skizo", "Oxford", "XYZ");
dt.Rows.Add("Prince", "Smith", "BCA");
dt.Rows.Add("Skizo", "Oxford", "XYZ");
I want this outcome into the table only rows without duplicates.
DataTable dt2 = new DataTable();
dt2.Columns.Add("FirstName");
dt2.Columns.Add("LastName");
dt2.Columns.Add("Quality");
dt2.Rows.Add("Kim", "Naidoo", "AWR");
dt2.Rows.Add("Prince", "Smith", "BCA");
I want this outcome into another table all rows with duplicates.
DataTable dt3 = new DataTable();
dt3.Columns.Add("FirstName");
dt3.Columns.Add("LastName");
dt3.Columns.Add("Quality");
dt3.Rows.Add("Tom", "Sushi", "ABC");
dt3.Rows.Add("Tom", "Sushi", "ABC");
dt3.Rows.Add("Skizo", "Oxford", "XYZ");
dt3.Rows.Add("Skizo", "Oxford", "XYZ");
dt3.Rows.Add("Skizo", "Oxford", "XYZ");