Export (0) Print
Expand All

6.2 Explicit conversions

Visual Studio .NET 2003

The following conversions are classified as explicit conversions:

  • All implicit conversions.
  • Explicit numeric conversions.
  • Explicit enumeration conversions.
  • Explicit reference conversions.
  • Explicit interface conversions.
  • Unboxing conversions.
  • User-defined explicit conversions.

Explicit conversions can occur in cast expressions (Section 7.6.6).

The set of explicit conversions includes all implicit conversions. This means that redundant cast expressions are allowed.

The explicit conversions that are not implicit conversions are conversions that cannot be proven to always succeed, conversions that are known to possibly lose information, and conversions across domains of types sufficiently different to merit explicit notation.

Show:
© 2014 Microsoft