use the Concat() method to concatenate strings
using System;
class MainClass {
public static void Main() {
string myString4 = String.Concat("Friends, ", "Romans");
Console.WriteLine("String.Concat(\"Friends, \", \"Romans\") = " + myString4);
string myString5 = String.Concat("Friends, ", "Romans, ", "and countrymen");
Console.WriteLine("String.Concat(\"Friends, \", \"Romans, \", " +"\"and countrymen\") = " + myString5);
}
}
Related examples in the same category