Converts a specified value to a double-precision floating-point number. Empty strings are converted to zero. Boolean values are converted to zero for false or one for true. All other conversions are done using NumberFormatInfo.InvariantInfo. If the conversion fails an exception is thrown.
double ToDouble(object value)
value |
The value to convert. |
Example
ToDouble("12.7")
Returns the double value 12.7.