I have List<Product[]> and I need to join them in Product[] from it.
views:
65answers:
2
+4
A:
You can use SelectMany
and then ToArray
to do this.
var result = source.SelectMany(i => i).ToArray();
Daniel Earwicker
2009-07-24 11:33:06
A:
You can use .Concat()
extension method as well, and then .ToArray()
:
x.Concat(y).Concat(z).ToArray();
Ravadre
2009-07-24 11:35:57