What\'s the most efficient way to concatenate strings?
If you're operating in a loop, StringBuilder
is probably the way to go; it saves you the overhead of creating new strings regularly. In code that'll only run once, though, String.Concat
is probably fine.
However, Rico Mariani (.NET optimization guru) made up a quiz in which he stated at the end that, in most cases, he recommends String.Format
.