Mono Class Library: System.Convert Overview | Members

System.Convert.ToDecimal Method

Converts a double to a decimal .

public static decimal ToDecimal (double value)

Parameters

value
The double value to be converted.

Returns

value as a decimal. The decimal contains 15 significant digits and is rounded using banker's rounding.

Exceptions

TypeReason
OverflowExceptionThe numeric value of value is greater than decimal.MaxValue or less than decimal.MinValue.

Remarks

Documentation for this section has not yet been entered.

Requirements

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