John Baird
Coatesville, Pennsylvania, United States
>>Question: I've always been confused about how the compiler optimizes string concatonation. Should you be using String.Format or String.Concat instead of the way you're doing it? Or will the compiler optimize it?
>
>
>For short strings, as in the demo, i don't think it matters.... but for the most part I use stringbuilder to concat long strings of data.....
AFAIR it is more a question of the no. of strings involved.
Methinks up to 4 operands of type string are better optimized than stringbuffer.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only