Are there differences between these examples? Which should I use in which case?
var str1 = \"abc\" + dynamicString + dynamicString2;
var str2 = String.Form
My rule of thumb is to use String.Format
if you are doing a relatively small amount of concatination (<100) and StringBuilder
for times where the concatination is going to be large or is potentially going to be large. I use String.Join
if I have an array and there isn't any formatting needed.
You can also use the Aggregate function in LINQ if you have an enumerable collection: http://msdn.microsoft.com/en-us/library/bb548651.aspx