I've got a String array that I'm wanting to add to a string builder by way of LINQ.
What I'm basically trying to say is "For each item in this array, append a line to this StringBuilder".
I can do this quite easily using a foreach loop however the following code doesn't seem to do anything. What am I missing?
stringArray.Select(x => stringBuilder.AppendLine(x));
Where as this works:
foreach(String item in stringArray)
{
stringBuilder.AppendLine(item);
}