xxxxxxxxxx
Double result = "12345.6789";
// outputs 12345.6789
print(result.ToString("r"));
convert a double value to a string using the ToString() method of the double type.
xxxxxxxxxx
double num = 3.14;
string str = num.ToString(); // str is now "3.14"
//You can also use the ToString() method to specify the format of the resulting string.
double num = 3.14;
string str = num.ToString("0.00"); // str is now "3.14"
//
In the above example, the "0.00" format string specifies that the resulting string should have two decimal places.