Compare Two data tables and print matched value row index from the table2 using linq

image

image

Assign Activity
arrMatchIDX | Int32 Array =

(From i in Enumerable.Range(0,dt2.Rows.Count)
Let v = dt2.Rows(i)("Name").toString.Trim
Let chk = dt1.AsEnumerable.Any(Function (d1) d1("Name").toString.Trim.Equals(v))
Where chk
Select idx = i).toArray

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.