What\'s the most efficient way to concatenate strings?
From Chinh Do - StringBuilder is not always faster:
Rules of Thumb
When concatenating three dynamic string values or less, use traditional string concatenation.
When concatenating more than three dynamic string values, use StringBuilder
.
When building a big string from several string literals, use either the @
string literal or the inline + operator.
Most of the time StringBuilder
is your best bet, but there are cases as shown in that post that you should at least think about each situation.