jae-l
5/15/2017 - 3:14 AM

Example of using string concatenation in different ways.

Example of using string concatenation in different ways.

string str = "100: " + 50 + 50;
Console.WriteLine(str); //  100: 5050

string str1 = "100: " + (50 + 50);
Console.WriteLine(str1);  //   100: 100

Console.WriteLine("50 + " + 50 + " = 100"); //  50 + 50 = 100
Console.WriteLine("c" + "a" + "t"); //  cat