Create an instance of
System.Collections.Generic.List<string></string>
, add all strings one by one to it, and then return
string[]
as
System.Collections.Generic.List<string>.ToArray()</string>
.
Alternatively, if the length of the string array is known in advance (let's say, it is
int count = _OutputToList.Count
), output it all directly to the string array:
string[] stringArray = new string[count];
for (int index = 0; index < count; ++index)
Keep it simple, I would advise. ;-)
—SA