I want to format a string as a decimal, but the decimal contains some following zeros after the decimal. How do I format it such that those meaningless 0\'s disappear?
I believe you want to do:
var s = String.Format("{0:#####.###}");