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

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

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -