I have a base class and an interface. Now I am creating a subclass from these. If I create a reference variable of the interface type to point to an object of the child class, can I access the base class methods using it?
Class BaseClass
{
public void baseClassMethod()
{
.....
}
}
Interface MyInterface
{
public void Interfacemethod();
}
Class ChildClass:BaseClass, MyInterface
{
....
}
....
main()
{
MyInterface myclass= new ChildClass ();
myclass.baseClassMethod();//Is this possible? y?
}