C#/.NET Little Wonders: Skip() and Take()

added by BlackRabbitCoder
3/30/2012 7:34:19 AM

1 Kicks, 93 Views

I’ve covered many valuable methods from System.Linq class library before, so you already know it’s packed with extension-method goodness. Today I’d like to cover two small families I’ve neglected to mention before: Skip() and Take(). While these methods seem so simple, they are an easy way to create sub-sequences for IEnumerable<T>, much the way GetRange() creates sub-lists for List<T>.


1 comments

BlackRabbitCoder
3/29/2012 7:20:18 PM
new post