Friday, July 30, 2010

Exploring IEnumerable

Out of the many useful methods provided in this interface are Skip() and Take().

If you ever need to obtain a subset out of your collection for any reason (eg Pageination) then use these methods in combination:


myCollection.Skip(startPosition).Take(ItemsToReturn)


http://msdn.microsoft.com/en-us/library/bb358985.aspx

http://msdn.microsoft.com/en-us/library/bb503062.aspx

No comments:

Post a Comment