I have a single object which can be derived from 3 separate classes. This derived object is then passed as a parameter into another class method. How do I determine which parent class owned my parameter?
Please refer to the code below:
DriverFord myFord = new DriverFord();
DriverChevy myChevy = new DriverChevy();
DriverHonda myHonda = new DriverHonda();
CarWheel myWheel = new CarWheel();
myWheel = myFord.GetWheel; //I created a Ford wheel object
SomeClass.SomeMethod(myWheel); //How do I determine whether that wheel came from a Ford, Chevy, or Honda object?