I guess you are speaking of such implementation:
IMyInterface
{
void ShowMe();
}
ClassA : IMyInterface
{
void ShowMe()
{
MessageBox.Show("ClassA");
}
}
ClassB : IMyInterface
{
void ShowMe()
{
MessageBox.Show("ClassB");
}
}
Now, if the call is made like:
IMyInterface objClass = new ClassA();
objClass.ShowMe();
This is an example of how Interface object was used to call method of child class. In actual it was not interface, it was ClassA object only. Because of Inheritance, child class object can be assigned to base class. Following implementation helps in cases where we need to design things whose implementation will be configured for a particular workflow. Generally Factory pattern is based on such implementation.
In actual it is the Child class object that is at work and not interface object. It deals with the problem of creating objects without specifying the exact class of object that will be created.
The essence here is to define an interface for creating an object, but let the classes that implement the interface decide which class to instantiate.