I have the following code:
foreach (DataRow rRow in Table.Rows)
if (rRow["Year"].ToString().Trim() == year.ToString())
total = float.Parse(Table.Rows["Total"].ToString().Trim()) / 100;
Now, this code pulls from Row index 0 all the time. The data table contains many rows, and I would like the Row that the data pulls from to be a specific index. I would like the index to pull where the rRow"Year" column is equal to the "year" variable and I don't know how to do this. Thanks!