Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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. The CLS-compliant alternative is Concat(Object[]).

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)
F# does not support methods that use variable length arguments (varargs).
The compiler automatically resolves calls to this method to the same method that uses a parameter array.

Parameters

arg0
Type: System.Object
The first object to concatenate.
arg1
Type: System.Object
The second object to concatenate.
arg2
Type: System.Object
The third object to concatenate.
arg3
Type: System.Object
The fourth object to concatenate.

Return Value

Type: System.String
The concatenated string representation of each value in the parameter list.

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.

NoteNote

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(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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.