468,315 Members | 1,510 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,315 developers. It's quick & easy.

how to convert string to double?

Hi,

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

Thanks in advance!
Cindy
Jul 21 '05 #1
4 46588

use cdbl function to convert the string

cdbl("123.456") will give you 123.456
Jul 21 '05 #2
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
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
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.

Similar topics

3 posts views Thread by Norvin Laudon | last post: by
17 posts views Thread by David Scemama | last post: by
4 posts views Thread by cindy liu | last post: by
1 post views Thread by joe | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.