Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Performance-wise, that's not much better than concatenation. You're still creating a bunch of throwaway string instances instead of effectively using the StringBuilder. Commented Feb 22, 2010 at 6:58
  • I'd suggest that you also create an Extension Method to handle the string concatenation, merely from a code readability perspective in conjunction with the above answer. Commented Feb 22, 2010 at 6:58
  • @Ahmad: What does an extension method accomplish here?? I wish I could downvote comments. Commented Feb 22, 2010 at 7:00
  • Why not use StringBuilder.AppendFormat()? Its not performance wiser than string.Format(), but at least does not create throw away strings. Commented Feb 22, 2010 at 7:42