【Unity】数値を1kみたい省略した表記に変換する

コード

using UnityEngine;

public static class MathUtility
{
    /// <summary>
    /// 桁数を取得
    /// </summary>
    /// <param name="num"></param>
    /// <returns></returns>
    public  static int Digit(ulong num)
    {
        System.Text.StringBuilder Sb = new System.Text.StringBuilder();
        Sb.Append(num);
        return Sb.Length;
    }

    /// <summary>
    /// 4桁表現のテキスト取得
    /// </summary>
    /// <param name="num"></param>
    /// <returns></returns>
    public static string GetCountText(ulong num)
    {
        var Length = Digit(num);
        System.Text.StringBuilder Sb = new System.Text.StringBuilder();
        Sb.Append(num);
        var text = Sb.ToString();
        if (Length < 4)
        {
          
        }
        else if (Length < 7)
        {
            var k = "k";
            text = text.Insert(text.Length - 3, ".");
            text = text + k;

        }
        else if (Length < 10)
        {
            var m = "m";
            text = text.RemoveEnd(3);
            text = text.Insert(text.Length - 3, ".");
            text = text + m;
        }
        else
        {
            var b = "b";
            text = text.RemoveEnd(6);
            text = text.Insert(text.Length - 3, ".");
            text = text + b;
        }
        return text;
    }
}