I am having following issue, how to overcome it, I have solved the problem but I think its not in the optimized way.
- I am having two datatable.
- First, datatable has 20 columns and 10 rows.
- Second, datatable has 22 colums extra 2 columns compared to first datatable.
- So, now using for each for first datatable inside it another for each for the second datatable has been kept.
- Inside second for each which has second datable, using IF statement inside it i have compared each and every columns of second datatable with each and every columns of the first datatable.
eg: row1(“column1”).tostring.trim.tolower.equals(row(“column1”). tostring.tolower) AND row1(“column2”).tostring.trim.tolower.equals(row(“column2”). tostring.tolower) … and so on
So my condition inside IF statement is too long but it is working without any issues, but i think it is not a efficient way to do. Is there any way to short the condition inside IF statement?