I have a simple console application in visual studio for testing some code before going big.
But now i have a problem with parsing some string to double.
When the users input is a String: 0.10
i want to convert this to a double.
So the output should be a double: 0.10.
But when i do this with the following code:
double r_value = 0;
r_value = Math.Round(double.Parse(value), 2);
Or
r_value = double.Parse(value);
The output will be: 10 or 10.0. How can it be this output changes like this? and converts to 10.0 instead 0.10 as i thought it should be.