There is absolutely no reason to convert double to float, because double is "wider" type. That is, even if float is required as input, in all such cases, double can be used; the conversion will be done implicitly. The opposite is not true, of course; and the conversion is done via a regular () operator:
float a = (float)b; // where b is double; it may fail
.
What you need is probably not related to "conversion" at all, but merely to the string representation of some numbers. This problem is solved via proper formatting. All you need to know is this:
Double.ToString Method (System)[
^],
Standard Numeric Format Strings[
^],
Custom Numeric Format Strings[
^].
That's all.
—SA