Tuesday, June 21, 2011

How to limit decimal places in double


Here I am limiting the decimal places to 3 in a double.
 
 double old_value = 3.142356;
 double new_value = Math.Round(old_value, 3);
:)

0 comments:

Post a Comment

 

2011 ·Code-Studio by yrus.