DataSet oDs = new DataSet(); DataTable odt = new DataTable();
odt.Columns.Add(new DataColumn("FILE_ID", typeof(string))); odt.Columns.Add(new DataColumn("ID", typeof(string))); oDs.Tables.Add(odt); oDs.AcceptChanges(); for (int i = 1; i < 3; i++) { DataRow oDr = oDs.Tables[0].NewRow(); oDr["FILE_ID"] = "a" + i; oDr["ID"] = "b" + i; oDs.Tables[0].Rows.Add(oDr); } for (int i = 1; i < 3; i++) { DataRow oDr = oDs.Tables[0].NewRow(); oDr["FILE_ID"] = "c" + i; oDr["ID"] = "d" + i; oDs.Tables[0].Rows.Add(oDr); } oDs.AcceptChanges(); DataTable odt1 = new DataTable(); odt1.Columns.Add(new DataColumn("FILE_ID", typeof(string))); odt1.Columns.Add(new DataColumn("ID", typeof(string))); oDs.Tables.Add(odt1); oDs.AcceptChanges(); for (int i = 1; i < 3; i++) { DataRow oDr = oDs.Tables[1].NewRow(); oDr["FILE_ID"] = "a" + i; oDr["ID"] = "b" + i; oDs.Tables[1].Rows.Add(oDr); } for (int i = 1; i < 3; i++) { DataRow oDr = oDs.Tables[1].NewRow(); oDr["FILE_ID"] = "c" + i; oDr["ID"] = "d" + i; oDs.Tables[1].Rows.Add(oDr); } oDs.AcceptChanges();
I need a LINQ query by which I can find if the combination of the values of rows (FILE_ID+ID) are unique & if they are the same in both the datatables