Hi!
I have two classes A and B. B inherits from A.
A has a protected property P that is of type IMyInterface. At runtime it is set to an object of type C that also implements the interface.
Now from B I need to alter P. I have acccess to it since it is declared as protected. But the problem is that when I try to change the property P it is not available, since all I see in B is the interface iMyInterface. I don't see the public variables that C contains.
Is there a way to make an on the fly cast of P to type C so I can access property P and make the change?
kind regards
Henrik
I have two classes A and B. B inherits from A.
A has a protected property P that is of type IMyInterface. At runtime it is set to an object of type C that also implements the interface.
Now from B I need to alter P. I have acccess to it since it is declared as protected. But the problem is that when I try to change the property P it is not available, since all I see in B is the interface iMyInterface. I don't see the public variables that C contains.
Is there a way to make an on the fly cast of P to type C so I can access property P and make the change?
kind regards
Henrik