<?xml version="1.0"?>
<clause number="13.2.3" title="Explicit reference conversions">
  <paragraph>The explicit reference conversions are: <list><list_item> From object to any <non_terminal where="11.2">reference-type</non_terminal>. </list_item><list_item> From any <non_terminal where="11.2">class-type</non_terminal> S to any <non_terminal where="11.2">class-type</non_terminal> T, provided S is a base class of T. </list_item><list_item> From any <non_terminal where="11.2">class-type</non_terminal> S to any <non_terminal where="11.2">interface-type</non_terminal> T, provided S is not sealed and provided S does not implement T. </list_item><list_item> From any <non_terminal where="11.2">interface-type</non_terminal> S to any <non_terminal where="11.2">class-type</non_terminal> T, provided T is not sealed or provided T implements S. </list_item><list_item> From any <non_terminal where="11.2">interface-type</non_terminal> S to any <non_terminal where="11.2">interface-type</non_terminal> T, provided S is not derived from T. </list_item><list_item> From an <non_terminal where="19.1">array-type</non_terminal> S with an element type SE to an <non_terminal where="19.1">array-type</non_terminal> T with an element type TE, provided all of the following are true: </list_item><list><list_item> S and T differ only in element type. (In other words, S and T have the same number of dimensions.) </list_item><list_item> Both SE and TE are <non_terminal where="11.2">reference-type</non_terminal>s. </list_item><list_item> An explicit reference conversion exists from SE to TE. </list_item></list><list_item> From System.Array and the interfaces it implements, to any <non_terminal where="19.1">array-type</non_terminal>. </list_item><list_item> From System.Delegate and the interfaces it implements, to any <non_terminal where="11.2">delegate-type</non_terminal>. </list_item></list></paragraph>
  <paragraph>The explicit reference conversions are those conversions between <non_terminal where="11.2">reference-type</non_terminal>s that require run-time checks to ensure they are correct. </paragraph>
  <paragraph>For an explicit reference conversion to succeed at run-time, the value of the source operand must be null, or the actual type of the object referenced by the source operand must be a type that can be converted to the destination type by an implicit reference conversion (<hyperlink>13.1.4</hyperlink>). If an explicit reference conversion fails, a System.InvalidCastException is thrown. </paragraph>
  <paragraph>Reference conversions, implicit or explicit, never change the referential identity of the object being converted. <note>[Note: In other words, while a reference conversion may change the type of the reference, it never changes the type or value of the object being referred to. end note]</note> </paragraph>
</clause>
