You can use value.ToString("0.######") . However, you should consider something else: double not a decimal (base 10) number. You do not have to rely on the decimal notation of a number to be reasonable - a lot of normal decimal bases of 10 numbers require infinite decimal expansion in base 2.
If you care about the decimal representation, it is better to use decimal instead - this is also a floating point number, but in the base 10.
And in any case, this involves rounding - it may or may not be what you want.
Luaan source share