Converts a Decimal to a Double with a default format.
[Visual Basic] Overloads Overridable Public Function ToDouble() As Double [C#] public virtual double ToDouble(); [C++] public: virtual double ToDouble(); [JScript] public function ToDouble() : double;
The result of converting the argument to a Double.
Exception Type | Condition |
---|---|
InvalidCastException | is thrown if it doesn't return a Decimal. |
The ToDouble method returns the specified parameter as an 8-byte double precision floating-point number.
Since a Double has fewer significant digits than a Decimal, this operation may produce round-off errors.
This method implements IConvertible, which replaced IValue. This methodis used to obtain the type code for a specified object. (See Convert and Value for more information about conversions; see the Type for more information about types.)
Decimal Structure | Decimal Members | System Namespace | Decimal.ToDouble Overload List