C# Language String Concatenation


Example

String Concatenation can be done by using the System.String.Concat method, or (much easier) using the + operator:

string first = "Hello ";
string second = "World";

string concat = first + second; // concat = "Hello World"
concat = String.Concat(first, second); // concat = "Hello World"

In C# 6 this can be done as follows:

string concat = $"{first},{second}";