Are there any codes that allow for numerical formatting of data when using string.format?
Loads, stick string.Format
into Google :-)
A quite good tutorial is at http://idunno.org/archive/2004/14/01/122.aspx
As Keith said above. The most common one I use is currency:
String.Format("{0:c}", 12000);
Which would output £12,000.00
Yes, you could format it this way:
string.Format("Format number to: {0 : #.00}", number);
string.Format("Format date to: {0 : MM/dd/yyyy}", date);
There are a number. This MS site is probably the best place to look
Here is another very good reference that compliments what Keith mentioned.
Taking someone else's answer and editing it and marking yourself as the person to answer is NOT COOL IMO.
Apologies. I wrote the question as I found info describing the feature in a book I was reading and I thought it would be good to add to the site so I posted the question but as I was writing the answer lots of you answered for me with some great sites so when I posted my answer it looked as if I had done exactly as robcthegeek described. Sorry if it looked that way and thanks for the great links.