none
How do I change the units of currency?

    Question

  • How do I change the units of currency displayed in Microsoft Visual Studio 2015 VB - got pounds, want dollars symbol?
    Tuesday, May 17, 2016 11:41 PM

Answers

  • It depends how you display these values. For example, if you have a label in a form, then you can specify the language explicitly using CultureInfo class:

        Dim amount As Decimal

        amount = 12.34

        Label1.Text = amount.ToString("C", CultureInfo.GetCultureInfo("en-US"))

    Another solution is to execute this line before other parts (inside Load event, for example):

        Application.CurrentCulture = CultureInfo.GetCultureInfo("en-US")

    Show some details if your situation is different.

    Wednesday, May 18, 2016 5:20 AM