The implicit numeric conversions are:
sbyte
to short
, int
, long
, float
, double
, or decimal
.byte
to short
, ushort
, int
, uint
, long
, ulong
, float
, double
, or decimal
.short
to int
, long
, float
, double
, or decimal
.ushort
to int
, uint
, long
, ulong
, float
, double
, or decimal
.int
to long
, float
, double
, or decimal
.uint
to long
, ulong
, float
, double
, or decimal
.long
to float
, double
, or decimal
.ulong
to float
, double
, or decimal
.char
to ushort
, int
, uint
, long
, ulong
, float
, double
, or decimal
.float
to double
.Conversions from int
, uint
, or long
to float
and from long
to double
may cause a loss of precision, but will never cause a loss of magnitude. The other implicit numeric conversions never lose any information.
There are no implicit conversions to the char
type. This in particular means that values of the other integral types do not automatically convert to the char
type.