Decimal Explicit Conversion (Double to Decimal)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Defines an explicit conversion of a double-precision floating-point number to a Decimal.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

F# does not support this operator


Type: System.Double

The double-precision floating-point number to convert.

Return Value

Type: System.Decimal

The converted double-precision floating point number.

Exception Condition

value is less than Decimal.MinValue or greater than Decimal.MaxValue.


value is Double.NaN, Double.PositiveInfinity, or Double.NegativeInfinity.

The following example converts Double values to Decimal numbers by using the Double to Decimal conversion. This conversion requires the op_Explicit operator in Visual Basic.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top