ECMA-334 C# Language Specification13.1.6: Implicit constant expression conversions |
An implicit constant expression conversion permits the following conversions:
constant-expression
(14.15) of type int can be converted to type sbyte , byte , short , ushort , uint , or ulong , provided the value of the constant-expression
is within the range of the destination type. constant-expression
of type long can be converted to type ulong , provided the value of the constant-expression
is not negative.