【发布时间】:2010-08-04 15:45:01
【问题描述】:
可能重复:
Is there an easy way in .NET to get “st”, “nd”, “rd” and “th” endings for numbers?
C# 中是否已经内置了将数字格式化为排名位置的功能?
“排名位置”是指 ["st","nd,"rd","th"] 之一,例如:(1st, 2nd, 3rd, 4th)。
我知道为此编写扩展很容易,我只是想知道该语言中是否已经有一些东西可以满足。
干杯
【问题讨论】:
-
感谢您的链接。很有帮助。
标签: c# formatting numbers