|
-
November 22nd, 2004, 04:41 AM
#1
ToDouble() ??
Hi @ll.
thisone is quite simple, but it seems not to be my day, so im asking you:
Code:
String *S = "1234.3245";
double d = S->ToDouble();
an IFormatProvider is needed as param for ToDouble, but i didnt manage to figure out, how to 
regards.
-
November 22nd, 2004, 09:52 PM
#2
Re: ToDouble() ??
Try this.
Code:
String *s = "1234.3245";
double d = Double::Parse( s );
"Lose it? It means go crazy...nuts...insane...bonzo...no longer in possession of one's faculties...3 fries short of a happy meal...WACKO!!!"
-
December 16th, 2004, 08:17 PM
#3
Re: ToDouble() ??
Usually when I convert strings to doubles in VC++ .NET, I use something like this:
String *str = S"1234.5678";
double d = System::String::Convert::ToDouble(str);
If you include "using namespace System::String;" at the top of your form, you can change the second line to just :
double d = Convert::ToDouble(str);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|