rustebbi
asked on
silli question about double AND strings
I have a simple function in C# that takes a number and power it by 2 like this
nr=Math.Pow(nr,2);
ok this might seem like a silly question, but what I want to do is return this number but in normal format, what I get now is something like 1,23459E+23
but what i realy want it 123456897,33
How can I do this
nr=Math.Pow(nr,2);
ok this might seem like a silly question, but what I want to do is return this number but in normal format, what I get now is something like 1,23459E+23
but what i realy want it 123456897,33
How can I do this
How is that number declared? Go with decimal and you should get what you are looking for.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Alternatively you could explicitly convert it:
Convert.ToDouble(Mth.Power (nr,2));
Convert.ToDouble(Mth.Power