Help greatly appreciated.
string formatted = value.ToString("N0");
This divides your number in the manner specified by the current culture (in the case of "en-US," it's a comma per multiple of 1000) and includes no decimal places.
The best place to look for any question regarding formatting numbers in .NET would have to be here:
Standard Numeric Format Strings (MSDN)
And here:
Custom Numeric Format Strings (MSDN)
string.Format("{0:n0}", 10562.3093);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With