Link to home
Start Free TrialLog in
Avatar of rustebbi
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
Avatar of tpatten
tpatten

How is that number declared? Go with decimal and you should get what you are looking for.
ASKER CERTIFIED SOLUTION
Avatar of testn
testn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alternatively you could explicitly convert it:

Convert.ToDouble(Mth.Power(nr,2));