Moose Factory Moose Factory - 4 months ago 25
C# Question

Convert a string array to a concantenated string in C#

Is there an easy way to convert a string array into a concantenated string?

For example, I have a string array:

new string[]{"Apples", "Bananas", "Cherries"};

And I want to get a single string:




A simple one...

string[] theArray = new string[]{"Apples", "Bananas", "Cherries"};
string s = string.Join(",",theArray);