C cindy liu Oct 7, 2003 #1 Hi, In .Net, how to convert a string to a double? Thanks in advance! Cindy
G Guinness Mann Oct 7, 2003 #2 In .Net, how to convert a string to a double? Click to expand... Convert.ToDouble(string) Converts the specified String representation of a number to an equivalent double-precision floating point number. [Visual Basic] Overloads Public Shared Function ToDouble( _ ByVal value As String _ ) As Double [C#] public static double ToDouble( string value ); [C++] public: static double ToDouble( String* value ); [JScript] public static function ToDouble( value : String ) : double; Parameters value A String containing a number to convert. Return Value A double-precision floating point number equivalent to the value of value.
In .Net, how to convert a string to a double? Click to expand... Convert.ToDouble(string) Converts the specified String representation of a number to an equivalent double-precision floating point number. [Visual Basic] Overloads Public Shared Function ToDouble( _ ByVal value As String _ ) As Double [C#] public static double ToDouble( string value ); [C++] public: static double ToDouble( String* value ); [JScript] public static function ToDouble( value : String ) : double; Parameters value A String containing a number to convert. Return Value A double-precision floating point number equivalent to the value of value.
B bdeveloper Oct 7, 2003 #3 use cdbl function to convert the string cdbl("123.456") will give you 123.456