Hi i have to datatables - two columns in each table.
The first column in both is guid.
I need to compare the guids in these two tables.
And return one datatable witch contains the second columns from each table.
To combine data from two tables where the guid is equal.
(Note: it doesnt have to be datatables, could be string arrays or whatever really.)
This code below never returns isEq=true - anyone has some code that can do this ?
bool isEq;
foreach(DataRow r_row in dtRvtPfv.Rows)
{
foreach (DataColumn r_col in dtRvtPfv.Columns)
{
if (r_col.ColumnName == BuiltInParameter.IFC_GUID.ToString())
{
if (r_row[r_col] != null)
{
isEq = dtTeklaPfv.Select().ToList().Exists(row => row["GUID"].ToString() == r_row[r_col].ToString());
if (isEq)
{
TaskDialog.Show("Guid match", r_row[r_col].ToString());
}
}
}
}
}
Solved! Go to Solution.