Double number format: 0:n3
Imports System
Public Class MainClass
Shared Sub Main()
'Declare variable
Dim dblNumber As Double
'Set number, divide numbers, and display results
dblNumber = 45.34
dblNumber /= 4.333
System.Console.WriteLine("Division test... " & dblNumber)
System.Console.WriteLine("With formatting: " & String.Format("{0:n3}", dblNumber))
End Sub
End Class
Related examples in the same category