Tuesday, 26 January 2010

Formatting for currency

This will turn 20000 into £20,000.00:
String.Format("{0:C}", myValue)
'myvalue' must be numeric. If it's a string, use Convert.ToDouble first.

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!