To concatenate two strings, use the String.Concat method.
Let’s say you want to concatenate two strings in C#, str1 and str2, then add it as arguments in the Concat method −
string str3 = string.Concat(str1, str2);
The following is the example −
using System; class Program { static void Main() { string str1 = "Brad"; string str2 = "Pitt"; // Concat strings string str3 = string.Concat(str1, str2); Console.WriteLine(str3); } }
BradPitt