Quote:
Originally Posted by _tao4229_
No, if you divide an int by an int it'll produce an int.
There's only one 'real' C# compiler; as for IDEs there's visual studio and #develop as the main ones, but both of them use the microsoft compiler ('csc.exe'). That compiler will produce an int when two ints are divided. (Even if you do this..
Code:
int i = 3;
int o = 2;
double d = i / o;
'd' still equals 1.)
|
I forgot what the type was, so I saw only doing 730001 / 10 in my head really. But yes, dividing a type leaves the result as the type used in the division. If you divide an integer it returns int, double a double, etc.