join

public static string join<T>(this IEnumerable<T> list, string separator)
{
	string s = "";
	foreach (object x in list) {
		s += x.ToString() + separator;
	}
	return (s.Length > separator.Length) ?
		s.Remove(s.Length - separator.Length) : String.Empty;
}
Example:
List<string> fruits = new List() { "Apple", "Banana", "Citron" }; fruits.join(", "); //=> "Apple, Banana, Citron" 

Description

--

Details

Double click on the code to select all.

 

;