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.

Syntax

public static double ToDouble (object value, IFormatProvider provider)

Parameters

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

Returns

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

Remarks

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.

Requirements

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