If a:
class Car : Automobile {}
I can do:
Car toyota = new Car(); Automobile tauto = (Automobile)toyota;
but if I do tauto.GetType().Name , it will still be Auto .
Is it possible to cast so that the type is constantly changed to Automobile (without cloning an object)?
The problem I'm trying to overcome is that there is no multiple inheritance in C #, and I need to combine objects (with the same signature) from two services in one way and return the same type.
inheritance c # clone oop
Sonic soul
source share