I have some fields returned by a collection as
2.4200 2.0044 2.0000
I want results like
2.42 2.0044 2
I t
In my opinion its safer to use Custom Numeric Format Strings.
decimal d = 0.00000000000010000000000m; string custom = d.ToString("0.#########################"); // gives: 0,0000000000001 string general = d.ToString("G29"); // gives: 1E-13