나는
IEnumerable<Foo> result = Items.SelectMany(f => f.Items);
을 시도했지만이 그냥 특정 개체 나에게 항목을 얻는다 - 그것은 모든 자식 개체에있는 모든 항목을하지 않습니다.
는 또한
IEnumerable<Foo> result = Items.SelectMany(t => t)
을 시도하지만 오류 얻을 : 당신이 fooList
라는 FooList
인스턴스가 있다고 가정
The type arguments for method 'System.Linq.Enumerable.SelectMany(System.Collections.Generic.IEnumerable, System.Func>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
FooList에는 foos 목록이 있습니다. 각 Foo에는 또한 foos 목록이 있으며, 각 foos에는 foos 목록이 있습니다. – rozza