You could use string.Join
:
string resultAsString = string.Join("-", myParam);
e.WebTest.Context.Add(this.ContextParameterName, resultAsString);
I'm assuming here that the query string parameter values are 0152, 1231, etc, and you want to combine them with dashes.
Since WebTest.Context.Add
can accept an object, you could also add the result as an array, if that suits your purposes:
e.WebTest.Context.Add(this.ContextParameterName, myParam.ToArray());
(Note that this string System.Linq.Enumerable+<DistinctItem>d_81``1[system.string]
is the type name, which is what ToString()
returns for any object by default (unless it's been overridden).)