C# Convert ToDouble(String)
Description
Convert ToDouble(String)
converts the specified string
representation of a number to an equivalent double-precision floating-point
number.
Syntax
Convert.ToDouble(String)
has the following syntax.
public static double ToDouble(
string value
)
Parameters
Convert.ToDouble(String)
has the following parameters.
value
- A string that contains the number to convert.
Returns
Convert.ToDouble(String)
method returns A double-precision floating-point number that is equivalent to the number
in value, or 0 (zero) if value is null.
Example
//from w ww.j a v a 2s. c om
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToDouble("78"));
}
}
The code above generates the following result.