【发布时间】:2022-01-13 19:50:55
【问题描述】:
我有包含 List 的父对象,而这个 child1 有 List ,当我将 Parent 对象作为输入参数传递时,我想将 List 项作为返回类型
【问题讨论】:
-
请不要包含代码截图。请在您的问题中直接包含相关代码。
-
这能回答你的问题吗? Difference Between Select and SelectMany
-
您可以使用
.SelectMany来展平孙对象。见:docs.microsoft.com/en-us/dotnet/api/…
标签: c# generics collections