How to loop through all rows of the DataTable?
You can do this in more than one way but ForEach loop is much better than any other way in terms of cleanliness of the code or performance.
ForEach loop
For loop
ForEach loop
foreach (DataRow row in dTable.Rows) { yourvariable = row["ColumnName"].ToString(); }
For loop
for (int j = 0; j< dTable.Rows.Count; j++) { yourvariable = dTable.Rows[j]["ColumnName"].ToString()l }