Here are the methods covered so far.
- Part 1 〰️ Select, Aggregate, Where, OrderBy (Ascending, Descending)
- Part 2 〰️ Any, Distinct, Concat, SelectMany
- Part 3 〰️ Reverse, Zip, Min/Max
- Part 4 〰️ Union, Intersect, Except
- Part 5 〰️ Sum, Average, Count
- Part 6 〰️ First, Last, DefaultIfEmpty, Skip, Take
- Part 7 〰️ Empty, Repeat, Range
- Part 8 〰️ All, Contains, SequenceEqual
In this article, I will cover following methods.
The sample collections used in this part are shown as below.
every is more flexible as the callback is also passed an index.
There are so many ways implement contains but i used some as it short circuits (returns as soon as a condition is met).
You can use
every here to check if two sequences are the same as every passes an index of current element to the callback.
🔴 Closing Remark
I hope this article can serve as a cheat sheet (that’s how I started this series).
Please let me know should you find any errors or improvements I can make to the codes.
The full source code and instructions on how to run them are on GitHub.