What is wrong with Math.Round() in VB.Net?

后端 未结 5 849
我寻月下人不归
我寻月下人不归 2020-12-06 10:08

I have encountered a weird case in Math.Round function in VB.Net

Math.Round((32.625), 2)

Result : 32.62



        
5条回答
  •  感动是毒
    2020-12-06 10:33

    Try this (from memory):

    Math.Round((32.635), 2, MidPointRounding.AwayFromZero)

提交回复
热议问题