System.String.Join Method

Concatenates the elements of an object array, using the specified separator between each element.


public static string Join (string separator, params object[] values)


The string to use as a separator. separator is included in the returned string only if values has more than one element.
An array that contains the elements to concatenate.


A string that consists of the elements of values delimited by the separator string. If values is an empty array, the method returns string.Empty.


If separator is null or if any element of values other than the first element is null, an empty string (string.Empty) is used instead. See the Notes for Callers section if the first element of values is null.

string.Join(string, Object[]) is a convenience method that lets you concatenate each element in an object array without explicitly converting its elements to strings. The string representation of each object in the array is derived by calling that object's ToString method.


Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: