b+=3;
will translate to
b =(byte)(b + 3);
Note, since the compiler does the implicit conversion without warning, you need to pay attention when using the compound-assignment operator. Some of the conversions are Narrowing conversions, just like in the last example, from an int to a byte. Narrowing conversions may lose information about the overall magnitude of a numeric value and may also lose precision.
What is the result of 'byte x = 100; x += 100;'? [ October 07, 2006: Message edited by: wise owen ]