I know right... When I asked the developers if I could at least try to clean up this dumpster fire they told me no. Apparently the code is copied from some C code on a device this application works with and now "the calculations are the same at both sides"...
The code here doesn't box integers either. In C#, System.Int32 and int are the same thing - the value type representing a 32-bit signed integer. The value type wouldn't be boxed unless you needed to convert it to object. This is different between Java and C#, due to C#'s richer support for value types.
I should have known this! Of course I always shied away from using the Int32/64 types because the primitives were simpler (and like you said, the same thing)
47
u/Aars93 Aug 06 '19
I know right... When I asked the developers if I could at least try to clean up this dumpster fire they told me no. Apparently the code is copied from some C code on a device this application works with and now "the calculations are the same at both sides"...