.NET String.Format() to add commas in thousands place for a number

Solution 1:

String.Format("{0:n}", 1234);  // Output: 1,234.00
String.Format("{0:n0}", 9876); // No digits after the decimal point. Output: 9,876

Solution 2:

I found this to be the simplest way:

myInteger.ToString("N0")