concat

Combines the text of two strings and returns a new string.

Applies to

String

Syntax

concat(string2)

Parameters

string1

The first string.

string 2

The second string.

Description

concat combines the text from two strings and returns a new string. Changes to the text in one string do not affect the other string.

Example

The following example combines two strings into a new string.

str1="The morning is upon us. "
str2="The sun is bright."
str3=str1.concat(str2)
Console.Write(str1)
Console.Write(str2)
Console.Write(str3)

This writes:

The morning is upon us. 
The sun is bright.
The morning is upon us. The sun is bright.