Mid LINQ

Flatten list of lists using SelectMany?

Flatten list of lists using SelectMany

List<List<int>> numbers = new() {

new() { 1, 2 },

new() { 3, 4 },

new() { 5 }

var flat = numbers.SelectMany(n => n);

More from LINQ Tutorial

All questions for this course