Rounding up numbers in GUI like Money

So, There i am, making my first actual game. Its a simple clicker game. I have a Code, wich makes the number of money you have appear on screen. However, when you get a lot of money, it displays the normal big number (for example you got a million, it shows 1000000). How would i go on making the number round up like money with letters at the end?
The code i have for the display:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GlobalCash : MonoBehaviour
{
    public static int CashCount;
    public GameObject CashDisplay;
    public int InternalCash;

    void Update ()
    {
      
      InternalCash = CashCount;
      CashDisplay.GetComponent<Text>().text = "$ " + InternalCash;

    }
}

This could be a simple way :slight_smile:

public string ConvertValue(int value)
    {
        float floatValue = value;

        if (value < 1000)
        {
            return value.ToString("$0");
        }
        else if (value < 1000000)
        {
            return (floatValue/1000).ToString("$#.##K");
        }
        else if (value < 1000000000)
        {
            return (floatValue/1000000).ToString("$#M");
        }
        else 
        {
            return (floatValue/1000000000).ToString("$#.##B"); 
        }

    }

And a cleaner version:

public string ConvertValue(int value)
    {
        float floatValue = value;

        if (value < 1000)
            return value.ToString("$0");

        else if (value < 1000000)
            return (floatValue/1000).ToString("$#.##K");

        else if (value < 1000000000)
            return (floatValue/1000000).ToString("$#M");

        else 
            return (floatValue/1000000000).ToString("$#.##B"); 
    }