string s = "Tom" + "Dick"+"Harry"+"AsManyMoreAsYouLike"since you are only assigning to a string once. But, since strings are immutable, if you do this:
string s = "Tom"; >s += "Dick"; >s += "Harry";then you are, in effect, creating a new 's' and discarding the old one with every addition. In that situation using a StingBuilder comes into its own....
string s = "Tom" + "Dick"+"Harry"+"AsManyMoreAsYouLike;is that there is something like associativity which is a convenient way to drop the parentheses.
string s = ( ( ("Tom" + "Dick")+"Harry" ) +"AsManyMoreAsYouLike ) ;In prefix notation
string s = +( +( +("Tom", "Dick"), "Harry") , "AsManyMoreAsYouLike)Which means that in the above case the + operator will be called 3 times with two operands. So it must return intermediate results, which will be stored on the heap since string is a reference type