© { JSL }
38
Text Box: Integer Conversions
Integer Conversions
·implicit, widening conversions
wnever lose information, never throw exception
·explicit narrowing conversions (casts)
wmay lose information, may throw exception
short s;
int m;
.locals(int16 V0,
        int32 V1)
ldloc.1
conv.ovf.i2
stloc.0
ldloc.1
conv.i2
stloc.0
s = checked((short)m);
s = unchecked((short)m);
s = (short)m;
?
csc /checked+
csc /checked-
C#
IL