Concatenates the elements of a specified string array.
The concatenated elements of values.
Type Reason ArgumentNullException values is a null reference.
The method concatenates each object in values; it does not add any delimiters.
An string.Empty string is used in place of any null object 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