【发布时间】:2022-02-02 21:06:42
【问题描述】:
(Type, int)[] Format1 = new[] {(typeof(Foo),1)};
(Type, int)[] Format2 = new[] { (typeof(Bar), 1),(typeof(Baz),1) };
IEnumerable<Type> allTypes() => //Foo,Bar,Baz
你能帮忙吗:
- 如何快速临时合并
Format1和Format2,以便... - 我们可以从元组中提取类型并将它们返回到
allTypes()
【问题讨论】:
-
将它们合并成一个列表和
SelectItem1? -
尝试使用
.Concat:allTypes = Format1.Concat(Format2);