LINQ Nth Record RRS feed

  • Question

  • HI,

    I wish to access nth record in a table. For example i want to get 5th record in a table etc.I am following this code getting error. Any help will be appreciated. 

     var hbidQry = (from s in ctx1.Sva_User_HB
                             orderby s.HB_ID ascending
                             where s.User_id.Equals(W.Profile.UserId)
                              select s.HB_ID).Take(5).Skip(4).Single();

    Saturday, July 26, 2014 7:15 AM