I need to format numbers (using WPF converters), and the only way I can do this is through string.Format.
I have two formatting options: scale and accuracy. I can achieve what I need separately, but it does not work with both:
Example (works):
string.Format("{0:#,##0,,}", 1234567890.123m) == "1,235" string.Format("{0:#,#.000}", 1234567890.123m) == "1,234,567,890.123"
What I need:
string.Format("????", 1234567890.123m) == "1,234.568"
(which would mean 1234.568 million) As you can see, I canβt find a format template that scales and displays decimal numbers.
Any idea?
source share