How do I Aggregate multiple IEnumerables of T

后端 未结 5 1767
春和景丽
春和景丽 2021-02-12 18:20

Given....

Public MasterList as IEnumerable(Of MasterItem)
Public Class MasterItem(Of T) 
    Public SubItems as IEnumerable(Of T)
End Class 

I

5条回答
  •  甜味超标
    2021-02-12 19:08

    Are you looking for SelectMany()?

    MasterList.SelectMany(master => master.SubItems)
    

    Sorry for C#, don't know VB.

提交回复
热议问题