String.Format(…)

Chris Martin points to a great String.Format(…) reference by Steve Tibbett. Once you’ve grokked the basics of String.Format(…) Steve’s guide is a good quick reference for the various ways that you can format the output of an object in .NET. The comments are also fantastic, especially the ones like Jorge de Cardenas (although I probably would have written that as:

string output = value == 0 ? “no” : “yes”;

But I guess it would depend on whether they could rightfully expect anything other than zero or one. Anyway – I digress, a very good reference – bookmarked and subscribed!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s