How to Program Currency in Vb.Net
- 1). Click the Windows "Start" button and click "All Programs" in the menu. Click "Microsoft .NET Framework" in the program groups, then click "Visual Studio." Open the VB.Net project after VS loads.
- 2). Double-click the VB.Net code file you want to use to calculate and display the currency data. Create a variable to store the calculated result. The following code shows you how to create a variable to calculate the currency value:
Dim money As Decimal - 3). Calculate the currency value. In the following example, a value is stored in the variable created in step two:
money = 23+56 - 4). Format and display the currency total. The following code shows you how to display a formatted currency value:
Console.WriteLine(String.Format("{0:C}", money))
The code above displays "$79.00" to the user.
Source...