Concatenates the string representations of the elements in an array of object instances.
- args
- An array of object instances to concatenate.
The concatenated string representations of the values of the elements in args.
Type Reason ArgumentNullException args is a null reference.
This method concatenates the values returned by the string.ToString methods on every object in the args array. string.Empty is used in place of any null reference in the array.
The following example demonstrates concatenating an array of objects.
C# Example
using System; public class StringConcatExample { public static void Main() { string str = String.Concat( 'c', 32, "String" ); Console.WriteLine( "The concatenated Object array is: {0}", str ); } }The output is
The concatenated Object array is: c32String
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0