I have a function in C# that returns the following:
...
float amount = smallestPercentage * (float)quantity;
return (int)amount;
Now I know I am suppose to use Convert.Int32(amount) rather than type cast an int, and that has fixed the problem. But my problem was really this...
When developing my program at home (Windows Vista) I would get a return value of 1, but when a deployed the program to another environment (Windows XP), I would get a return value of 0.
I was wondering if this has to do with the Windows version, the .NET version or even the CPU processor?
Thanks.
David