整数の桁数を取得する
int digits = Math.Log10(decimal) + 1;
Code language: C# (cs)
参考:
序数を表示する
参考:
Is there an easy way to create ordinals? – Stack Overflow
Is there an easy way in .NET to get “st”, “nd”, “rd” and “th” endings for numbers? – Stack Overflow