Reputation: 100366
How to split an IEnumerable
of IEnumerables
to one flat IEnumerable
using LINQ
(or someway else)?
Upvotes: 21
Views: 7197
Reputation: 57979
IEnumerable<IEnumerable<int>> number_collections = ...
IEnumerable<int> collection = number_collections.SelectMany(x => x);
Upvotes: 8