I am looping through every row in a datatable:
foreach (DataRow row in dt.Rows) {}
I would like to get the index of the current row within
Try:
int i = Convert.ToInt32(dt.Rows.Count);
I think it's the shortest, thus the simplest way.