DataTable dt = ds.Tables[0]; DataRow[] dr = dt.Select("name='" + result[k2] + "' and school='" + result1[k3] + "'");. foreach (DataRow row in dr) { // here i want to find the index }
int index = dt.Rows.IndexOf(row);
for
for (int index = 0; index < dt.Rows.Count; ++index) { // nothing to do here, 'index' is already what you need. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)