Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok, I'm trying to figure out how to only get the two numbers after a decimal point. Like, I want 1.17, and I get 1.1730213... How can I get just that many digits? And I don't want just significant digits, either... If I get 1024.02, I want it to show as 1024.02.

If I need to word this better, please let me know...
Posted

1 solution

You're looking for the String.Format function.

Then, this page (Custom Numeric Format Strings[^]) shows you what to put in as the format.
 
Share this answer
 
Comments
drummerboy0511 22-Oct-10 16:59pm    
Thanks! That was just what I was looking for!

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