SyntaxFix
Write A Post
Hire A Developer
Questions
Use the modulus operator:
var fourPlaces = 0.5485M; var twoPlaces = fourPlaces - (fourPlaces % 0.01M);
result: 0.54