Click here to Skip to main content
15,906,341 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have an integer number say 1, I need to format that into 1.000000000E+003. How can I achieve this. I used this code..
string HEIGHT = string.Format("{0:0.#########E+003}", Math.Round( height / 1000.000,9));
Posted

1 solution

Take off the three: it prints as a character, not controls teh number of exponent digits you want. If you want a three digit exponent, do this:
C#
string HEIGHT = string.Format("{0:0.#########E+000}", Math.Round(height / 1000.000, 9));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900