System.Convert.ToDouble Method

Converts the value of the specified object to an double-precision floating-point number, using the specified culture-specific formatting information.


public static double ToDouble (object value, IFormatProvider provider)


An object that implements the IConvertible interface.
An object that supplies culture-specific formatting information.


A double-precision floating-point number that is equivalent to value, or zero if value is null.


The return value is the result of invoking the IConvertible.ToDouble(IFormatProvider) method of the underlying type of value.

provider enables the user to specify culture-specific conversion information about the contents of value. For example, if value is a string that represents a number, provider could supply culture-specific information about the notation used to represent that number.

The base types ignore provider; however, the parameter may be used if value is a user-defined type that implements the IConvertible interface.


Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,