c# - How do I get the last 5 rows of a datatable? -
how last 5 rows of datatable? tried this:
var long_bottom = longslection.last(5); where longslection datarow. had error, idea?
not sure have got here
var long_bottom = longslection.last(5);
assuming have datatable , want last 5 rows can via
datatable1.asenumerable().reverse().take(5); take , skip return specific number of elments (parameter int) while not case last last element or need predicate checking conditions or checks within row.
Comments
Post a Comment