Is it possible to concatenate a List<List<T>>
into a List<T>
with a single operation in a way which isn't horrible slow, i.e:
List<List<int>> listOfLists = new List<List<int>>();
List<int> concatenatedList = listOfLists.Something...
?
listOfLists.SelectMany( l => l );
full line:
List<int> concatenatedList = listOfLists.SelectMany( l => l ).ToList();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With