C # concat two Collection <string> using linq and getting Collection <string> result
I am trying to do this:
var collection1 = new Collection<string> {"one", "two"};
var collection2 = new Collection<string> {"three", "four"};
var result = collection1.Concat(collection2);
But the result variable is an Enumerable [System.String] type, whereas I need a [System.String] collection
I tried casting:
var all = (Collection<string>) collection1.Concat(collection2);
But the joys.
+5
2 answers