Türkçe   |   English
Calendar
Categories
Archive
Links
Blogroll
Files

02.12.2009
String.Join

It's easy to produce a string output of an array of strings in our applications. But it's even easier with the String.Join function:

string[] arr = new string[3];

arr[0] = "a";
arr[1] = "b";
arr[2] = "c";

string joined = String.Join("|", arr);
MessageBox.Show(joined);

This code will return an output of "a|b|c"

This overload takes the seperator as the first parameter and string array as the second parameter.

Code
Comments(0)

Photos
Me in MSDN Forums
Entries
News
Articles