By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,180 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,180 IT Pros & Developers. It's quick & easy.

how to convert string to double?

P: n/a
Hi,

In .Net, how to convert a string to a double?

Thanks in advance!
Cindy
Jul 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

use cdbl function to convert the string

cdbl("123.456") will give you 123.456
Jul 21 '05 #2

P: n/a
System.Double.Parse()

"cindy liu" <ci*******@spam.com> wrote in message
news:24*****************************@phx.gbl...
Hi,

In .Net, how to convert a string to a double?

Thanks in advance!
Cindy

Jul 21 '05 #3

P: n/a
In article <24*****************************@phx.gbl>, ci*******@spam.com
says...
In .Net, how to convert a string to a double?


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.

--
Who's better for furniture? NOOOOOOOOOOOOOOOOOOBODY!!!!

Guinness Mann
GM***@Dublin.com

Jul 21 '05 #4

P: n/a
Try using the system.Convert.ToDouble() function
-----Original Message-----
Hi,

In .Net, how to convert a string to a double?

Thanks in advance!
Cindy
.

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.