This documentation is archived and is not being maintained.

6.1.6 Implicit constant expression conversions

Visual Studio .NET 2003

An implicit constant expression conversion permits the following conversions:

  • A constant-expression (Section 7.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.
  • A constant-expression of type long can be converted to type ulong, provided the value of the constant-expression is not negative.
Show: