c# join string comma delimited, but double quote all values inside
c#
Solution
var joinedNames = "\"" + string.Join("\", \"", fields) + "\"";
Problem
I have a string list ``` new List<string> { "One", "Two", "Three", "Four", "Five", "Six" } ``` And I want to have a string with exact this content (including double quotes) ``` "One", "Two", "Three", "Four", "Five", "Six" ``` Because will write a text file that will be a array[] = { my_string } I tried this with no success ``` var joinedNames = fields.Aggregate((a, b) => "\"" + a + ", " + b + "\""); ``` Little LINQ help will be greatly appreciate :)