tags:

views:

83

answers:

2

Hello

How can I get the Nth row using Linq? both columns are text so I cant use min/max

/M

+4  A: 
var nthItem = items.Skip(n).First();
Mark Seemann
+1  A: 

You can use skip and take.

var result = myData.OrderBy(<your order by>).Skip(5).Take(1);
ck
Take doesn't return an item, it returns a sequence (with one element in this case).
Mark Seemann
@Mark: indeed it does, and I think it's best we've given the OP both options.
ck