C# Decimal ToDouble
Description
Decimal ToDouble
converts the value of the specified
Decimal to the equivalent double-precision floating-point number.
Syntax
Decimal.ToDouble
has the following syntax.
public static double ToDouble(
decimal d
)
Parameters
Decimal.ToDouble
has the following parameters.
d
- The decimal number to convert.
Returns
Decimal.ToDouble
method returns A double-precision floating-point number equivalent to d.
Example
Example of decimal.ToDouble methods.
/* w ww.jav a 2 s . c om*/
using System;
class MainClass
{
public static void Main( )
{
object DoubleValue;
DoubleValue = decimal.ToDouble( 0.0000000000000000000000000001M );
Console.WriteLine(DoubleValue);
}
}
The code above generates the following result.