C# Language Concatenation of two strings using $


Example

$ provides an easy and a concise method to concatenate multiple strings.

var str1 = "text1";
var str2 = " ";
var str3 = "text3";
string result2 = $"{str1}{str2}{str3}"; //"text1 text3"