Information Technology Reference
In-Depth Information
Figure 18-17. A reference conversion returns a different type associated to the object.
Implicit Reference Conversions
Just as there are implicit numeric conversions that the language will perform for you automat-
ically, there are also implicit reference conversions. These are illustrated in Figure 18-18.
All reference types can implicitly be converted to type object .
￿
￿
Any interface can be implicitly converted to an interface from which it is derived.
￿
A class can be implicitly converted to
-
Any class in the chain from which it is derived
-
Any interface that it implements
Figure 18-18. Implicit conversions for classes and interfaces
Search WWH ::




Custom Search