Does an equivalent of Java RoundingMode.HALF_DOWN exist in C#?
RoundingMode.HALF_DOWN
For example, I want to round 1.265 to 1.26, and 1.266
1.265
1.26
1.266
Use the .Round method with the following constructor overload:
.Round
public static double Round (double value, int digits, MidpointRounding mode);
Calling like so:
Math.Round(value, 2, MidpointRounding.AwayFromZero);
Here's full documentation.