Exploring MoreLINQ Part 22 - Append and Prepend
The next video in my exploring MoreLINQ series covers a few extension methods that allow us to insert elements into an existing sequence. The first two, Append
and Prepend
, allow you to insert a single element at the start or end of a sequence, and are so useful that they are now part of the official .NET Framework (from version 4.7.1 onwards).
Then there's also Insert
and Backsert
, which allow you to insert a sequence at a particular location within an existing sequence, counting either from the start (Insert
) or the end (Backsert
).
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.