问题描述:

This question already has an answer here:

  • c# - How do I round a decimal value to 2 decimal places (for output on a page)

    20 answers

网友答案:

You need to apply a string format:

string.Format("{0:N2}", 45.7)

Check here for docs on the string formatters

相关阅读:
Top