C# Convert ToDouble(Object)
Description
Convert ToDouble(Object)
converts the value of the specified
object to a double-precision floating-point number.
Syntax
Convert.ToDouble(Object)
has the following syntax.
public static double ToDouble(
Object value
)
Parameters
Convert.ToDouble(Object)
has the following parameters.
value
- An object that implements the IConvertible interface, or null.
Returns
Convert.ToDouble(Object)
method returns A double-precision floating-point number that is equivalent to value,
or zero if value is null.
Example
//from www. j av a 2 s . c om
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToDouble((Object)78));
}
}
The code above generates the following result.