Using
.RemoveAt()
inside a
foreach
loop is asking for trouble, there are other ways.
DataTable can filter the data, you could use
DataTable.Select()
to filter your data table, here is an example:
DataTable.Select Method (String) (System.Data)[
^]
var expression = "Date > #1/1/00#";
DataRow[] foundRows;
foundRows = table.Select(expression);
for(int i = 0; i < foundRows.Length; i ++)
{
Console.WriteLine(foundRows[i][0]);
}