How To Round A Decimal Down To The Nearest Whole Number Using C#



TODO:

Have you ever wanted to round a number down to the nearest whole number using C#.  Example:  14.789 rounded down to 14

 

SOLUTION:

Math.Truncate(14.789)  //produces 14

 

NOTES:

There are no notes on this topic.



Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading