So I have a List<> of items.
each item has a list of other items (grandparent > parent > child > children etc...)
I want to now flatten the list so all the items are in just one list.
how can I do this?
I tried:
but I get a compiler error:Code:List<Items> flat = structuredItems.SelectMany(m => m);
Code:Error 202 The type arguments for method 'System.Linq.Enumerable.SelectMany<TSource,TResult>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource,System.Collections.Generic.IEnumerable<TResult>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.





any chance of a regain? 
Reply With Quote