Using string.Format for simple things?
- by Gerrie Schenck
In my early .Net programming days, I used string.Format() only for complex string concatenations, for example to compile strings as
Problem with customer order 234 of date 2/2/2002 and payment id 55543.
But now I use string.Format for almost every string concatenation I have to do, also simple ones such as prefixing a string with something.
Console.WriteLine(string.Format("\t\t{0}", myString));
Is there any possible overhead on this? Maybe I should use the regular + operator to do these simple operations?
What's your opinion on this?