Hi
I have case: i have datable with 6 columns. I need to compare values in column number 4 between themselves to get true or false.
How best to do it?
R - Row no
C - Col No
For R = 0 to TotalRows - 1
For C = 0 to 5
{
if ( dTable1.rows(R).item(C).toString == dTable2.rows(R).item(C).toString )
else
}
}
i need to compare not columns, but values in one column
Sorry, corrections
dTable1.rows[R].item[C].toString == dTable2.rows[R].item[c].toString
replace square brackets with parenthesis
i scraped datatable from ie and got a datatable.
in this datatable i have 6 columns.
i need to compare first value in 4th column with other values in 4th column. And if at least once the condition does not work - false, and if all the values are the same - true
Try like this,
dta is your datatable
boolCompare= If( (From p In dta.Select
Select Convert.ToString(p("Column-4 Name"))).ToList.Distinct.Count=1,True,False)
Regards,
Mahesh