Jan 11, 2019 10:07 AM|mspace|LINK
thank you for your reply,,, it is helpful
I tried this
DataTable dt3 = cols.Copy();
foreach (DataRow row1 in cols2.Rows)
bool isRecordExist = false;
foreach (DataRow row2 in cols1.Rows)
//judge whether it is a duplicate by judging whether the array count and item value is exist in orther row data array (The rules of judgment can be improved by yourself).
var stringArr = cols1.Rows.ItemArray.Select(x => x.ToString()).ToArray();
var stringArr2 = cols2.Rows.ItemArray.Select(x => x.ToString()).ToArray();
foreach (var numberA in stringArr)
foreach (var numberB in stringArr2)
if (numberA == numberB)
isRecordExist = true;
But what it going wrong is that is adding the columns instead of deleted them....
can you help a little bit?