C# Convert ToDouble(Decimal)
Description
Convert ToDouble(Decimal)
converts the value of the
specified decimal number to an equivalent double-precision floating-point
number.
Syntax
Convert.ToDouble(Decimal)
has the following syntax.
public static double ToDouble(
decimal value
)
Parameters
Convert.ToDouble(Decimal)
has the following parameters.
value
- The decimal number to convert.
Returns
Convert.ToDouble(Decimal)
method returns A double-precision floating-point number that is equivalent to value.
Example
// w w w . j a v a2 s. c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToDouble((Decimal)78));
}
}
The code above generates the following result.