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 :)
var joinedNames = "\"" + string.Join("\", \"", fields) + "\"";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With