Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
How about ordinary Numbers Convert into the form of scientific notation?Thank you for your help!
Posted
Comments
Sergey Alexandrovich Kryukov 1-Jul-15 11:52am    
There is no "convert". Numbers don't have "form", only string representing numbers do. You don't "convert", you format string. Use string.Format or numeric types' ToString methods with proper format specifiers.
—SA
Lee Yuan 1-Jul-15 11:55am    
Thank you for your explain.

Try:
C#
double d = 12345.6789;
Console.WriteLine("{0:e}", d);
 
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