Try
var it = GetTheNestedCase(); return it.SelectMany(x => x);
SelectMany is a LINQ transformation that essentially says: "For each item in the collection, the items in the collection are returned." It will turn one element into many (hence, SelectMany). This is great for breaking collections of collections into a flat list.
JaredPar Nov 26 '08 at 16:05 2008-11-26 16:05
source share