Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# round to 2 decimal places

decimal a = 1.994444M;

Math.Round(a, 2); //returns 1.99

decimal b = 1.995555M;

Math.Round(b, 2); //returns 2.00
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #decimal #places
ADD COMMENT
Topic
Name
8+5 =