For simple string concatenations, use the + approach. This is easier for simple things that do not require a format.
For more complex strings that have a specific format and where it is useful to preserve the structure of the entire string and provide a placeholder for input, use String.Format .
And yes, there is overhead. String.Format uses StringBuilder under covers. Simple string concatenations will be much faster in these scenarios. Several tests and blog posts on this topic can be found quite easily. Of course, it all depends on your use. If there are small ends in the loop, then reusing String.Format is more likely to be more noticeable than a simple + concat. If you create a large chain in a loop, then the classic example is preferable to StringBuilder , and related questions on concat and StringBuilder can be found on SO.
EDIT: To clarify this, this is impractical: String.Format("{0}{1}", a, b) , since there is not much formatting. It is just a + b . Unfortunately, I met such examples in production code, and as soon as I see String.Format, I expect to see something that needs to be structured in a certain way, and not just concat.
OTOH, consider this phone number: "(" + area + ") " + number + " x" + extension - there is too much going on, and this is not easy to change. In this case, String.Format is preferable: String.Format("({0}) {1} x{2}", area, number, extension) . This is still a trivial example, but you get the idea.
source share