I was taught that to improve performance in VB.NET, we can use StringBuilder to concatenate strings.
StringBuilder1.Append(string1)
StringBuilder1.Append(string2)
As opposed to:
string1 = string1 & string2
Likewise, is there a performance gain of StringBuilder over &=
concatenation?
StringBuilder1.Append(string1)
StringBuilder1.Append(string2)
As opposed to:
string1 &= string2
A more senior developer on my team is opposed to the use of StringBuilder. Is there a way to benchmark these differences? Or is the difference insignificant except in heavy volume environments? I know there are lots of answers to StringBuilder vs. concatenation on the web and SO, but I couldn't find any specifically related to &=
concatenation.