Module Example
Public Sub Main()
Dim values() As String = { "-1,035.7", "1AFF", "1e-35", "190.34001", "1.29e325"}
Dim result As Double
For Each value As String In values
Try
result = Convert.ToDouble(value)
Console.WriteLine("Converted '{0}' to {1}.", value, result)
Catch e As FormatException
Console.WriteLine("Unable to convert '{0}' to a Double.", value)
Catch e As OverflowException
Console.WriteLine("'{0}' is outside the range of a Double.", value)
End Try
Next
End Sub
End Module