Interview Question
Sunday, July 14, 2013
How to get Top N result From Linq?
datatable dt1
=
(
from
result
in
dt1
.
AsEnumerable
().
OrderBy
(
result
=>
Guid
.
NewGuid
())
select
result
).
Take
(
10
).
ToList
().
CopyToDataTable
();
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment