Possible Duplicate:
Does C# optimize the concatenation of string literals?
string foo = "bar1" + "bar2" + "bar3";
Does the c# compiler internally apply the string.Concat method ?
Then it would be better to use the + operator for the readability sake.
With literals, this is equivalent to:
string foo = "bar1bar2bar3";
No concatenation is performed- they are combined at compile time into a constant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With