I have 2 data table which have 3 column.
DataTable dt1 = new DataTable();
dt1.Columns.Add("Department");
dt1.Columns.Add("name");
dt1.Columns.Add("marks");
dt1.Rows.Add("it", "abc", 80);
dt1.Rows.Add("cs", "xyz", 67);
dt1.Rows.Add("mec", "abc",76);
dt1.Rows.Add("ece", "xyz", 73);
DataTable dt2 = new DataTable();
dt2.Columns.Add("Department");
dt2.Columns.Add("name");
dt2.Columns.Add("marks");
dt2.Rows.Add("it", "abc", 80);
dt2.Rows.Add("cs", "xyz", 50);
dt2.Rows.Add("mec", "abc", 76);
dt2.Rows.Add("eee", "abc", 40);
i want to compare two data table and wants in one table in below format
Department name marks status
it abc 80 same record
cs xyz 67 modified record
mec abc 76 same record
ece xyz 73 deleted record
eee abc 40 new record