Double.TryParse Method (String, Double) Converts string to double-precision floating-point number
Module Example
Public Sub Main()
Dim value As String
Dim number As Double
value = Double.MinValue.ToString()
If Double.TryParse(value, number) Then
Console.WriteLine(number)
Else
Console.WriteLine("{0} is outside the range of a Double.",value)
End If
value = Double.MaxValue.ToString()
If Double.TryParse(value, number) Then
Console.WriteLine(number)
Else
Console.WriteLine("{0} is outside the range of a Double.",value)
End If
End Sub
End Module
Related examples in the same category