Math.Round的枚举参数

public enum MidpointRounding

Fields

TABLE 1
AwayFromZero 1

When a number is halfway between two others, it is rounded toward the nearest number that is away from zero.

ToEven 0

When a number is halfway between two others, it is rounded toward the nearest even number.

ToNegativeInfinity 3

When a number is halfway between two others, it is rounded toward the result closest to and no greater than the infinitely precise result.

ToPositiveInfinity 4

When a number is halfway between two others, it is rounded toward the result closest to and no less than the infinitely precise result.

ToZero 2

When a number is halfway between two others, it is rounded toward the result closest to and no greater in magnitude than the infinitely precise result.

猜你喜欢

转载自www.cnblogs.com/dayang12525/p/12807624.html