String.Concat Method (String())

Concatenates the elements of a specified String array.

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

Public Shared Function Concat ( _
	ParamArray values As String() _
) As String


Type: System.String()
An array of string instances.

Return Value

Type: System.String
The concatenated elements of values.


values is Nothing.


Out of memory.

The method concatenates each object in values; it does not add any delimiters.

An Empty string is used in place of any null object in the array.

The following code example demonstrates the use of the Concat method with a String array.

Public Class Example

   Public Shared Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
      Dim s As String() = {"hello ", "and ", "welcome ", "to ", "this ", "demo! "}

      ' make an array of strings. Note that we have included spaces

      ' put all the strings together
      outputBlock.Text &= String.Concat(s) & vbCrLf

      ' sort the strings, and put them together
      outputBlock.Text &= String.Concat(s) & vbCrLf
   End Sub 'Main
End Class 'ConcatTest


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions