You want to display a value as currency using the format of the culture of the local machine. The documentation is not too clear on how you use this stuff so I have a little sample that I managed to get working. Here you go:
In C#:
using
System;
using System.Globalization;
namespace
ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
NumberFormatInfo numberInfo = CultureInfo.CurrentCulture.NumberFormat;
double myAmount = 10.815;
Console.WriteLine(Math.Round(myAmount, 2).ToString("c", numberInfo));
Console.ReadLine();
}
}
}
In VB:
Imports System.Globalization
Module Module1
Sub Main()
Dim numberInfo As NumberFormatInfo = CultureInfo.CurrentCulture.NumberFormat
Dim myAmount As Double = 10.815
Console.WriteLine(Math.Round(10.815, 2).ToString("c", numberInfo))
Console.ReadLine()
End Sub
End Module