子句 子句
Bouquet { List<> Flowers { ; ; } } SelectVsSelectMany() { List<Bouquet> bouquets = List<Bouquet>() { Bouquet { Flowers = List<> { , , , }}, Bouquet{ Flowers = List<> { , , }}, Bouquet{ Flowers = List<> { , , , , }}, Bouquet{ Flowers = List<> { , , , }} }; IEnumerable<List<>> query1 = bouquets.Select(bq => bq.Flowers); IEnumerable<> query2 = bouquets.SelectMany(bq => bq.Flowers); Console.WriteLine(); (IEnumerable<String> collection query1) ( item collection) Console.WriteLine(item); Console.WriteLine(); ( item query2) Console.WriteLine(item); }