First of all, Stringand StringBuilder- different classes.
Stringa class represents immutable types , but a class StringBuilderrepresents mutable types.
When you use +to combine your lines, it uses String.Concat. And each time it returns a new string object.
StringBuilder.Append . , .
The Sad Tragedy of Micro-Optimization Theater
. . . !
, , . , - -, , , .
, ? , , , . - 100 000 , 3,5 Core 2 Duo.
1: Simple Concatenation 606 ms
2: String.Format 665 ms
3: string.Concat 587 ms
4: String.Replace 979 ms
5: StringBuilder 588 ms