string.Concat
uses StringBuilder
to do its job. So if you have a single operation that concats multiple strings I prefer string.Concat
because of the shorter syntax.
var result = string.Concat("abc", "def");
If you have to perform multiple operations, then one single StringBuilder
instance should be used, to be more performant (because multiple string.Concat
calls will instantiate their own StringBuilder
each time).
var builder = new StringBuilder();
for (int i = 0; i < numberOfOperations; i++)
{
builder.Append(getStringResult());
}