Possible Loss of Fraction
c#, math
Solution
When you divide two int's into a floating point value the fraction portion is lost. If you cast one of the items to a float, you won't get this error.
So for example turn 10 into a 10.0
double returnValue = (myObject.Value / 10.0);
Problem
Forgive me if this is a naïve question, however I am at a loss today. I have a simple division calculation such as follows: ``` double returnValue = (myObject.Value / 10); ``` Value is an int in the object. I am getting a message that says Possible Loss of Fraction. However, when I change the double to an int, the message goes away. Any thoughts on why this would happen?