a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
7 lines
2.4 KiB
XML
7 lines
2.4 KiB
XML
<?xml version="1.0"?>
|
|
<clause number="13.1.4" title="Implicit reference conversions">
|
|
<paragraph>The implicit reference conversions are: <list><list_item> From any <non_terminal where="11.2">reference-type</non_terminal> to object. </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 derived from 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 implements T. </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 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 implicit reference conversion exists from SE to TE. </list_item></list><list_item> From any <non_terminal where="19.1">array-type</non_terminal> to System.Array. </list_item><list_item> From any <non_terminal where="11.2">delegate-type</non_terminal> to System.Delegate. </list_item><list_item> From any <non_terminal where="19.1">array-type</non_terminal> or <non_terminal where="11.2">delegate-type</non_terminal> to System.ICloneable. </list_item><list_item> From the null type to any <non_terminal where="11.2">reference-type</non_terminal>. </list_item></list></paragraph>
|
|
<paragraph>The implicit reference conversions are those conversions between <non_terminal where="11.2">reference-type</non_terminal>s that can be proven to always succeed, and therefore require no checks at run-time. </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>
|