I have List<Product[]> and I need to join them in Product[] from it.
From stackoverflow
dynback.com
-
You can use
SelectManyand thenToArrayto do this.var result = source.SelectMany(i => i).ToArray();From Daniel Earwicker -
You can use
.Concat()extension method as well, and then.ToArray():x.Concat(y).Concat(z).ToArray();From Ravadre
0 comments:
Post a Comment