Lesson 28 of 34 · Inheritance & Interfaces
Quiz: C# Inheritance, Interfaces and Polymorphism
Inheritance, abstract classes, interfaces and polymorphism are the core of object-oriented C#. They are also where subtle bugs hide: methods that are hidden instead of overridden, casts that throw, and switch arms in the wrong order.
Answer these questions to make sure the ideas have clicked. Then step into the hall of mirrors — the chapter boss is waiting.
What this quiz covers
The questions check what you learned in the Inheritance & Interfaces chapter of Learn C#. Not sure about a topic? Review its lesson first:
- C# Inheritance: virtual, override and base
Learn inheritance in C#: derive classes with :, call base constructors, use protected members, and customise behaviour with virtual, override and sealed.
- C# Abstract Classes and Abstract Methods
Learn abstract classes in C#: abstract methods without a body, overriding them in derived classes, and sharing code with the template method pattern.
- C# Interfaces: Contracts for Your Classes
Learn C# interfaces: declare contracts, implement several interfaces in one class, program against interface types and use is to test for capabilities.
- Polymorphism in C#: One Interface, Many Forms
See polymorphism in C#: virtual dispatch through base-class references, collections of mixed types, type patterns with is and switch, and when to use them.
Keep learning
Need a quick reminder? The C# cheat sheet has every topic of Learn C# on one page.
Lesson last updated on .