代码实现

  1. Math.Round(11.4m, 0, MidpointRounding.AwayFromZero);
  2. //输出 11
  3. Math.Round(11.5m, 0, MidpointRounding.AwayFromZero);
  4. //输出 12