unable to increment byte value with expression but with increment operator

Viewed 1137

why the following is valid

byte i=0;
i++;

where as the following is invalid

byte i=0;
i=i+1;

what would be the reason?

I know in the case of i+1 the entire value is explicitly incremented by 1 (which will be int value) so compilation problem will occur, but in case of i++ it does the same but did not get any error.

3 Answers
Related