How do I Aggregate multiple IEnumerables of T
.net, ienumerable, linq, vb.net
Solution
Are you looking for SelectMany()?
MasterList.SelectMany(master => master.SubItems)
Sorry for C#, don't know VB.
Problem
Given.... ``` Public MasterList as IEnumerable(Of MasterItem) Public Class MasterItem(Of T) Public SubItems as IEnumerable(Of T) End Class ``` I would like a single IEnumerable(Of T) which will iterate through all SubItems of all MasterItems in MasterList I would like to think that there is a Linq facility to do this, or an extension method I am overlooking. I need a mechanism that works in VB9 (2008) and hence does not use Yield.