Why is int i = 2147483647 + 1; OK, but byte b = 127 + 1; is not compilable?
int i = 2147483647 + 1;
byte b = 127 + 1;
As an evidence to @MByD:
The following code compiles:
byte c = (byte)(127 + 1);
Because although expression (127 + 1) is int and beyond the scope off byte type the result is casted to byte. This expression produces -128.
(127 + 1)
byte
-128