Displays the same value with four decimal digits
Imports System
Imports System.Globalization
Class NumberFormatInfoSample
Public Shared Sub Main()
Dim nfi As NumberFormatInfo = New CultureInfo("en-US", False).NumberFormat
nfi.PercentDecimalDigits = 4
Dim myInt As [Double] = 0.1234
Console.WriteLine(myInt.ToString("P", nfi))
End Sub 'Main
End Class 'NumberFormatInfoSample
Related examples in the same category