public class Test
public Shared Sub Main
Dim n As Double
n = 12
n /= 7
Console.WriteLine("Without formatting: " & n)
Dim s As String
s = String.Format("{0:n3}", n)
Console.WriteLine("With formatting: " & s)
End Sub
End class
Without formatting: 1.71428571428571
With formatting: 1.714