Linq Query Generic Parameters RRS feed

  • Question

  • Hi,

    I want to ask that what is the need of generic parameters in the followiing query  For Example Take, Skip, ToList.

    can I use it without these generic parameter. If I can't Then Why??

    private IList<Product> GetProducts(int startingPageIndex, int pageSize) { using (NorthwindDataContext context = new NorthwindDataContext()) { return context.Products .Take<Product>(pageSize) .Skip<Product>(startingPageIndex * pageSize) .ToList<Product>(); } }


    Monday, July 16, 2012 4:46 AM


  • I don't think you need them, can work without them.

    Mark Answered, if it solves your question and Vote if you found it helpful.
    Rohit Arora

    Monday, July 16, 2012 4:53 AM