An explicit reference conversion includes:
From object to any reference type
From the class type S to the class type T, where S is the base class for T.
From the base type S to the interface type T, where S is not a sealed class and does not implement T.
From the interface type S to the class type T, where T is not a sealed class, and does not implement S.
From the interface type S to the interface type T, where S is not a sub-interface of T.
The conversion of an array type S with an element type of TS to a type T with an element type of TT requires that the following conditions be met:
S and T are only the data types of the elements, but the dimensions are the same.
Both TS and TT are reference types.
There is an explicit reference conversion from TS to TT.
From System.Array to array type.
From System.Delegate to Representative type.
From system.icloneable to array type or representative type.
Explicit reference conversions occur between reference types and need to be detected at run time to ensure that they are correct.
To ensure the normal execution of an explicit reference conversion, the value of the source variable must be null or the type of the object it refers to can be converted to the target type by an implicit reference. Otherwise, an explicit reference conversion fails, and a InvalidCastException exception is thrown.
Implicit or explicit reference conversions, although they may change the type of reference value, do not change the value itself.