I have these variables
string a;
string b;
List<string> StringList = new List<string>();
string c;
I would like to define a new string array like so
string[] StringArray = new string[] {a, b, StringList**.METHODHERE** , c} ;
Is there a neat way to convert the list to the array, flatten it, and add the items to the array? Right now I have something like
string[] ar = new string[] { };
ar[0] = a;
ar[1] = b;
for (int i = 0; i < RpsPdfFilenamesList.Count(); i++)
{ar[i + 2] = RpsPdfFilenamesList.ElementAt(i);}
ar[2 + RpsPdfFilenamesList.Count()] = c;
But im sure theres a fairly basic method out there that im missing that will reduce this code.