By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

Formatting Currency

P: n/a
How is everyone formatting currency with VB.NET?

Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal
switch that some locales use?

I hope .NET makes this easy for me! :-)

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I would say you are better off storing a list of currency codes, symbols,
and decimal places for each currency. I don't think windows settings can
keep up with different currencies, what countries are using which ones, etc.

This also means, that when whatever after .NET comes out, your port will be
easy. You won't have to figure out how to do this in some other framework.

"Mitchell Vincent" <mv******@newsgroup.nospam> wrote in message
news:Oz****************@tk2msftngp13.phx.gbl...
How is everyone formatting currency with VB.NET?

Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal switch
that some locales use?

I hope .NET makes this easy for me! :-)

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com

Nov 21 '05 #2

P: n/a
Mitchell.

The currency difference in the States in Europe is now probably not more
than in America.The oldest 6 EU states plus Ireland, Greece, Spain,
Portugal, Finland, and Austria use the Euro.

In the local settings of the computer are the currencies, and when you do it
right you have almost nothing to do.

There are only two states in Europe that uses a point as decimal point
separator the UK and Ireland. (The same as in America, beside all the States
of the US and English speaking Canada).

However normally there is nothing to do for it, it is a part of the Net and
the OS.

Look for it especially to the overloading ToString and the numberformatinfo

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps,

Cor

..
Nov 21 '05 #3

P: n/a
Mitchell Vincent wrote:
How is everyone formatting currency with VB.NET?

Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal
switch that some locales use?

I hope .NET makes this easy for me! :-)


For future reference :

Dim Price as Double = 10.00

Debug.Writeline(String.Format("{0:c}", Price)

Does it!

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #4

P: n/a
Hi

Thanks for your experience sharing.
If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.