Click or drag to resize
ConvertToDecimal Method (Double)
Converts the value of the specified double-precision floating-point number to an equivalent decimal number.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static decimal ToDecimal(
	double value
)

Parameters

value
Type: SystemDouble
The double-precision floating-point number to convert.

Return Value

Type: Decimal
A decimal number that is equivalent to value.
Exceptions
ExceptionCondition
OverflowExceptionvalue is greater than MaxValue or less than MinValue.
See Also