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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -