Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- decimal input = 94.8725M; //傳給Round的第一個參數一定要用decimal,不可以使用flot或是double
- decimal output = Math.Round(input, 3, MidpointRounding.AwayFromZero);
- Console.WriteLine(output);
- //input 94.8725
- //output 94.873
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement