It looks like you are very new in such things, so you better need to read a good book on OOP. It's not so easy to explain from scratch, but I'll try.
With inheritance, we face such thing as
run-time type vs.
compile-time type. First, let's look at it without interfaces:
class Base {
internal A() { }
}
class Derived : Base {
internal B() { }
}
Base instance = new Derived();
instance.A();
instance.B();
((Derived)instance).B();
What is the type of
instance
? Compile-time type is
Base
; this is how compiler sees it. Run-time type is
Derived
, could be checked during run-time using operators
is
or
as
(find them by yourself in C# reference).
Now, interfaces. The interface to be implemented has the syntax of base class list, and indeed, interface is "inherited" by the implementing class as it was an abstract class, which is similar to interfaces in many aspects.
The interface can only be a compile-time type. During runtime, you can have objects which has the interface compile-time types, but their run-time type is always some class or structure implementing this interface. Interface is some type which is, it I may say so, "always abstract". In the context of your question, the situation is the same as with base and derived class.
—SA