Posted in:

The second video in my Exploring MoreLINQ series looks at several MoreLINQ methods for checking that a sequence has the number of elements that we require. These are AtLeast, AtMost, Exactly, and CountBetween.

And we also look at AssertCount which is a handy method that you can use to throw an exception if the input sequence is not of the length you expect, but allow everything to pass through otherwise.

You can find all videos in this series here.

Want to learn more about LINQ? Be sure to check out my Pluralsight course LINQ Best Practices.

Comments

Comment by Dan Carter

Good choice of player names :) #upthegunners

Dan Carter