2010-04-09 166 views

回答

44
enumerable.SelectMany(x => x) 
12
var result = from e in enumerables 
      from v in e 
      select v; 
+3

要abatishchev,這在功能上等效於邁赫達德的回答表示查詢表達式sysntax與擴展方法和lambda表達式。 – 2010-04-09 21:42:37

4
IEnumerable<IEnumerable<int>> number_collections = ... 
IEnumerable<int> = number_collections.SelectMany(x => x); 
相關問題