Mid LINQ

Use SelectMany to flatten nested collections?

Use SelectMany to flatten nested collections

var nested = new List<List<string>> {

new() { "A", "B" },

new() { "C", "D" }

var flat = nested.SelectMany(x => x);

More from LINQ Tutorial

All questions for this course