Use operator + to concatenate two or more string objects.
Set the first string object.
char[] c1 = { 'H', 'e', 'n', 'r', 'y' };
string str1 = new string(c1);Now, set the second string object.
char[] c2 = { 'J', 'a', 'c', 'k' };
string str2 = new string(c2);Now display the concatenated strings using + operator.
Example
using System.Text;
using System;
class Program {
static void Main() {
char[] c1 = { 'H', 'e', 'n', 'r', 'y' };
string str1 = new string(c1);
char[] c2 = { 'J', 'a', 'c', 'k' };
string str2 = new string(c2);
Console.WriteLine("Welcome " + str1 + " and " + str2 + "!");
}
}Output
Welcome Henry and Jack!