Interfaces Inheritance
Two situations are related to both inheritance and interfaces. The first scenario is when you create a class that derives from another one that implements an interface. In such a scenario the derived class also inherits members implemented through an interface and does not need to implement the interface again. Moreover, if the base class is marked as overridable members implemented via an interface, the derived class can override such members if not private. The second scenario is a pure interface inheritance, in which an interface can inherit from another one. Continuing the previous examples, we can consider creating an IInvoice interface that inherits from IDocument providing some more specific members to represent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access