tags:

views:

53

answers:

1

Formatting large amounts of money is not an issue (e.g. converting a decimal to dollars):

myDecimal.ToString("C", {some culture info});

However, my current problem is dealing with very small amounts of money (e.g. cents/pence, etc.) and rather than formatting 5 cents as $0.05 (or 5 pence as £0.05), I need to format as 5¢ or 5p. Is there anything built in to the .NET framework to handle this? Or am I stuck rolling my own?

+2  A: 

I'm pretty certain that you're on your own, I'm afraid. Sorry that doesn't help much.

There is only NumberFormatInfo.CurrencySymbol - nothing more granular.

Marc Gravell
You appear to be correct. The CurrencySymbol only gives the $ sign, but it's easy enough to roll my own class using the NumberFormatInfo.CurrencyDecimalDigits and a reference like http://en.wikipedia.org/wiki/Cent_(currency). I'm struggling to find a better currency resource for fractions on the main unit of curency, though. I don't necessarily trust wikipedia...
mkedobbs