LINQ SelectMany in Depth

The Utility Knife for Nested Collections

SelectMany is in many ways the opposite of GroupBy which I covered last time in this series on LINQ. While GroupBy took a single collection and transformed it into multiple child collections, SelectMany flattens child collections into a single merged collection.

So, how is this flattening actually useful?

Basic SelectMany Operations