I have datatable in vb.net 2008 has 40000 rows. i want to delete 1000 rows from that datatable not from database.
i want to do this without looping
I know remove and removeat but both need looping.
is there any way i can achieve this thing ?
I have datatable in vb.net 2008 has 40000 rows. i want to delete 1000
Share
You could use YourDataTable.Take(39000) or YourDataTable.Skip(1000)
Or if there is a critera that should match. Use select , YourDataTable.Select(x => x.Something = “yourvalue”). But this will also loop the collection.