Skip to main content

C# Commafy Number Extension Method. Assumes culture en-us.

public static string Commafy(this int number)
{
    return number.ToString("N0");
}

// Usage
1000.Commafy(); // 1,000