howto delete rows from DataTable in C# with a filter?

i have a DataTable with some rows, one of it is a ID (a string) and a System.DateTime. the other rows are not important now.

now i want to delete all the rows with the same ID that have an older DateTime as the newest.

is this possible?

here an example

  • ID:123 Date:24.12.2010 ...
  • ID:123 Date:23.12.2010 ...
  • ID:123 Date:22.12.2010 ...

after this i only want:

  • ID:123 Date:24.12.2010 ...
6
задан Stecya 16 May 2011 в 14:58
поделиться