Concatenates the elements of a specified array.
- values
- An array of string instances to concatenate.
A string containing the concatenated elements of values.
Type Reason ArgumentNullException values is a null reference.
string.Empty is used in place of any null reference in the array.
The following example demonstrates concatenating an array of strings.
C# Example
using System; public class StringConcatExample { public static void Main() { string str = String.Concat( "one", "two", "three", "four", "five" ); Console.WriteLine( "The concatenated String array is: {0}", str ); } }The output is
The concatenated String array is: onetwothreefourfive
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0