How to update multiple rows in datatable based in particular value without using foreach loop

@Manjuts90

Try this expression:

yourDT.AsEnumerable().Where(Function(row) row(“Column1”).ToString.Equals(“text”)).Select(Function(row) DT.Rows.IndexOf(row)).ToArray()

this will expression will give index of all matching rows and output is array of integer. If you have any doubts then let me know.

5 Likes