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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…