1、升序
var stuList = students.OrderBy(d => d.BirthDate).Skip(1).Take(1).ToList(); //按出生排升序,students是Linq查询得到的记录,Skip(1)是跳一行记录,Take(1)是取一条记录
2、降序
var stuList = students.OrderByDescending(d => d.BirthDate).Skip(1).Take(1).ToList(); //解释同上
1、升序
var stuList = students.OrderBy(d => d.BirthDate).Skip(1).Take(1).ToList(); //按出生排升序,students是Linq查询得到的记录,Skip(1)是跳一行记录,Take(1)是取一条记录
2、降序
var stuList = students.OrderByDescending(d => d.BirthDate).Skip(1).Take(1).ToList(); //解释同上