Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

String::Concat Method (Object^, Object^, Object^, Object^)


Concatenates the string representations of four specified objects and any objects specified in an optional variable length parameter list.

This API is not CLS-compliant.

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

static String^ Concat(
	Object^ arg0,
	Object^ arg1,
	Object^ arg2,
	Object^ arg3,


Type: System::Object^

The first object to concatenate.

Type: System::Object^

The second object to concatenate.

Type: System::Object^

The third object to concatenate.

Type: System::Object^

The fourth object to concatenate.

An optional comma-delimited list of one or more additional objects to concatenate.

Return Value

Type: System::String^

The concatenated string representation of each value in the parameter list.


This API is not CLS-compliant. The CLS-compliant alternative is String::Concat(array<Object^>^). The C# and Visual Basic compilers automatically resolve a call to this method as a call to String::Concat(array<Object^>^).

The method concatenates each object in the parameter list by calling its parameterless ToString method; it does not add any delimiters.

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


The last parameter of the Concat method is an optional comma-delimited list of one or more additional objects to concatenate.

Notes to Callers:

This method is marked with the vararg keyword, which means that it supports a variable number of parameters. The method can be called from Visual C++, but it cannot be called from C# or Visual Basic code. The C# and Visual Basic compilers resolve calls to Concat(Object^, Object^, Object^, Object^) as calls to Concat(array<Object^>^).

The following example illustrates the use of the Concat(Object^, Object^, Object^, Object^) method to concatenate a list of variable parameters. In this case, the method is called with nine parameters.

No code example is currently available or this language may not be supported.
Return to top
© 2017 Microsoft