The fifteenth video in my Exploring MoreLINQ series looks at a powerful capability of MoreLINQ to view all items in a sequence with a sliding 'window'. So with a sequence of
ABCDEFG and a window size of 3, the first window would be
CDE all the way to
MoreLINQ provides the
Window extension method to achieve this, but also
WindowRight that offer additional options about how the output sequence starts and stops.
Note that if you are using a window size of 2, there is another helpful MoreLINQ method called
Pairwise which we'll be discussing next in this series.
You can find all videos in this series here.