Concatenate an array of strings into a single string
suggest changeThe System.String.Join
method allows to concatenate all elements in a string array, using a specified separator between each element:
string[] words = {"One", "Two", "Three", "Four"};
string singleString = String.Join(",", words); // singleString = "One,Two,Three,Four"
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents