I want to round up always in c#, so for example, from 6.88 to 7, from 1.02 to 2, etc.
How can I do that?
Use Math.Ceiling()
Math.Ceiling()
double result = Math.Ceiling(1.02);
I want to do this using the Math.Round function
I want to round up double value in two decimal places in c# how can i do that? double inputValue = 48.485; after round up inputValue = 48.49; Related: c# - How do I round a decimal value to 2 decimal places (for output on …
How can I round values to nearest integer? For example: 1.1 => 1 1.5 => 2 1.9 => 2 "Math.Ceiling()" is not helping me. Any ideas?