String.Concat Method (Object, Object)


Concatenates the string representations of two specified objects.

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

static member Concat : 
        arg0:Object *
        arg1:Object -> string


Type: System.Object

The first object to concatenate.

Type: System.Object

The second object to concatenate.

Return Value

Type: System.String

The concatenated string representations of the values of arg0 and arg1.

The method concatenates arg0 and arg1by calling the parameterless ToString method of arg0 and arg1; it does not add any delimiters.

String.Empty is used in place of any null argument.

If either of the arguments is an array reference, the method concatenates a string representing that array, instead of its members (for example, "System.String[]").

The following example demonstrates the Concat method.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top