954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

set currency format

Hi,

im my c# windows application i have some reports involving currency. However the way to set the format that I've seen "C" sets the currency symbol to the dollar sign instead of the GBP sound which is the one i need.

I've checked my systems regional settings and they're all correct. Is there a different format I should be using?

Many thanks

jlivvers
Light Poster
26 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

You need to set the Culture setting in the String.Format method. It seems to use en-us by default.

You would need to use something along the lines of:
String.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:C}", 12.99);

This will set the format template to whatever system regional settings are for this format command.

Ketsuekiame
Master Poster
752 posts since May 2010
Reputation Points: 349
Solved Threads: 107
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: