Formatting Decimals in C# - C# Programming Tutorials
www.daveoncsharp.com › 2009 › 09The Thousand Separator. To format your decimal number using the thousand separator, use the format string {0:0,0} as shown in the below example: string.Format (" {0:0,0.00}", 1234256.583); // "1,234,256.58" string.Format (" {0:0,0}", 1234256.583); // "1,234,257".
C# Format Numbers as String Example - code-sample.net
www.code-sample.net › CSharp › Format-NumberDecimal point and Thousand separator. Use ". " (point) for set the position of the decimal separetor and ", " (comma) for thousand separator. double number = 1234.56 ; string .Format ( " {0:0.000}", number) // 1234.560 string .Format ( " {0:#,0.00}", number) // 1,234.56 string .Format ( " {0:#,0.####}", number) // 1,234.56 // Thousand separator and number scaling string .Format ( " {0:#,0}", 123000000) // 123,000,000 string .Format ( " {0:#,0, K}", 123000000) // 123,000 K string .Format ( " ...