Efficient search
Hi,
I have two tables that I create to display information in a DataGridView Control. Now I need to compare the fields of these two tables. It is somewhat like:
void SomeFunction()
{
for (int i = 0; i < tableA.Rows.Count ; i++)
{
DataRow rowA = tableA.Rows[ i ] ;
for (int j = 0; j < tableB.rows.count ; j++)
{
DataRow rowB = tableB.Rows[ j ];
if (rowA["Col1"].ToString().Equals(rowB["Col1"].ToString()))
DoSomeProcessing();
}
}
}
I am sure there are much more better and efficient ways to perform this comparison. I would appreciate if I can get some really good suggestions.
Thanks!

