How many String objects will be created when using a plus sign in the below code?
String result = \"1\" + \"2\" + \"3\" + \"4\";
If it was
I found the answer at MSDN. One.
How to: Concatenate Multiple Strings (C# Programming Guide)
Concatenation is the process of appending one string to the end of another string. When you concatenate string literals or string constants by using the + operator, the compiler creates a single string. No run time concatenation occurs. However, string variables can be concatenated only at run time. In this case, you should understand the performance implications of the various approaches.