You can use a custom string format that would be simple, but probably not as effective as the version-specific manual format:
string text = value.ToString("000,000,000", CultureInfo.InvariantCulture);
Note the use of CultureInfo.InvariantCulture to avoid using the group symbol of the current culture (and number).
One option for manual rolling:
static string ToDigitsAndCommas(int value) { char[] chars = new char[11]; chars[3] = ','; chars[7] = ','; int remainder; for (int i = 0; i < 9; i++) { value = Math.DivRem(value, 10, out remainder); chars[10 - i - (i / 3)] = (char) (remainder + '0'); } return new string(chars); }
I would recommend a comparative analysis of this to find out if it is really needed, and not a simple code :)
source share