S
Santi
I have two classes: Product and Fruit which inherits from Product.
If I try to narrow the reference to the base type by a cast, I always get a
reference to the inherited type.
For example:
Fruit lemon = new Fruit();
Product prod = (Product)lemon; // Now prod is a Fruit Type!!
I want to get a Product reference from a Fruit object, is it possible?
thank you.
If I try to narrow the reference to the base type by a cast, I always get a
reference to the inherited type.
For example:
Fruit lemon = new Fruit();
Product prod = (Product)lemon; // Now prod is a Fruit Type!!
I want to get a Product reference from a Fruit object, is it possible?
thank you.