I need to convert a decimal number to formatted string with thousand groups and unlimited (variable) decimal numbers:
1234 -> "1,234" 1234.567 -> "1,234.567" 1234.1234567890123456789 -> "1,234.1234567890123456789"
I tried String.Format("{0:#,#.#}", decimal), but it trims any number to max 1 decimal place.
See Question&Answers more detail:os