All math operations are returned as an integer?

Possible duplicate:
byte + byte = int ... why?

I have a grid from (-1024, -1024) to (1024,1024), so I don’t need all the values ​​that int provides, but I noticed that all my algorithms are returned as int and I need to come up with all of them (short) . Can anyone explain why all the math operations are returned as int, and is parsing as short as the math operations are returned as int more efficient?

short yCoordinate = (short)(short.Parse(RtData[1][1]) - 1);
+3
source share
1 answer

int, , . BCL , , , , .

, , (short, int, long ..) . , int .

+2

Source: https://habr.com/ru/post/1730835/


All Articles