How do you round a number to two decimal places in C#?

后端 未结 15 1037
挽巷
挽巷 2020-11-22 08:59

I want to do this using the Math.Round function

15条回答
  •  不思量自难忘°
    2020-11-22 09:37

    You should be able to specify the number of digits you want to round to using Math.Round(YourNumber, 2)

    You can read more here.

提交回复
热议问题