I have the abstract class ClasseA
and 2 child classes ClasseB
and ClasseC
, then I have an interface IClasse
that is implemented in ClasseA
and ClasseB
.
In the interface I have the metodo1
method that receives an instance of ClasseA
, but in implementations of this method in the child classes of ClasseA
I need the metodo1
to receive an instance of its respective class, In ClasseB
, the method should receive a ClasseB
instance, in the implementation in ClasseC
it should receive a ClasseC
instance.
I'm not sure, but should not this work because they are ClassA daughters?