Could someone point me, why here:
Byte b = 100;
b = (Byte)(b+200);
I have to use explicit type conversion. But here
Byte b = 100;
b += 200;
I don’t need to do this?
Does compiler generate different IL code for this two cases? And which case is better?
Because the standard permits it (see the second case below):
The IL code should be essentially identical in this case. Of course, if evaluating
bhas side effects, it will be evaluated twice in theb = (byte)b + 200case and only once when using compound assignment.