Posted in:

The eleventh video in my Exploring MoreLINQ series looks at the Pad and PadStart extension methods. These simple methods help out if you have a sequence that you need to be at least n items long.

If the input sequence is shorter than the desired length it will pad it with sufficient additional elements (and you can control what those are) to make it the length you need.

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.