Hi @ll.
thisone is quite simple, but it seems not to be my day, so im asking you:
an IFormatProvider is needed as param for ToDouble, but i didnt manage to figure out, how to :(Code:String *S = "1234.3245";
double d = S->ToDouble();
regards.
Printable View
Hi @ll.
thisone is quite simple, but it seems not to be my day, so im asking you:
an IFormatProvider is needed as param for ToDouble, but i didnt manage to figure out, how to :(Code:String *S = "1234.3245";
double d = S->ToDouble();
regards.
Try this.
Code:String *s = "1234.3245";
double d = Double::Parse( s );
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);