Formatting Currency

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mitchell Vincent

    #1

    Formatting Currency

    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
  • Marina

    #2
    Re: Formatting Currency

    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" <mvincent@newsg roup.nospam> wrote in message
    news:OzucdK%23V FHA.3840@tk2msf tngp13.phx.gbl. ..[color=blue]
    > 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[/color]


    Comment

    • Cor Ligthert

      #3
      Re: Formatting Currency

      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 numberformatinf o

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

      I hope this helps,

      Cor

      ..


      Comment

      • Mitchell Vincent

        #4
        Re: Formatting Currency

        Mitchell Vincent wrote:[color=blue]
        > 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! :-)
        >[/color]

        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

        Comment

        • Peter Huang [MSFT]

          #5
          Re: Formatting Currency

          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.

          Comment

          Working...