© { JSL }
38
Integer Conversions
·
implicit, widening conversions
w
never lose information, never throw exception
·
explicit narrowing conversions (casts)
w
may 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