0 Comments Posted in:

The ninth video in my Exploring MoreLINQ series looks at the FillForward and FillBackward extension methods. These ones allow you to replace "missing" values in the incoming sequence with replacements from elsewhere in the sequence, something that would be tricky to achieve without an extension method like this.

For example, null can be replaced with either the previous non-null value using FillForward or the next non-null value using FillBackward. And you can control what is considered a missing value as well, so it doesn't have to be just nulls that get replaced.

You can find all videos in this series here.

Want to learn more about LINQ? Be sure to check out my Pluralsight course More Effective LINQ.
Vote on HN