I'm building flat file content from collections of strings.
Example collection: A, B, C, D, E, etc.
I want to be able to output these values to a string with line feeds in one swoop with Linq if possible.
Sample Output:
A
B
C
D
E
etc.
Here's the VB.NET code that does the job currently:
For Each fieldValue As String In field.Values
fileContent.Append(fieldValue + Environment.NewLine)
Next
I've tried a bunch of ways to get Linq to do the job, but haven't been able to find the right combination. Thoughts?