SHSubjectHub

Method Overriding and Polymorphism (C#)

OOPA-levelLesson packSubscription

About this resource

Learn how to override methods in C# using virtual and override keywords, how to extend parent behaviour with base.Method(), and how polymorphism works at runtime.

11 slides.

Lesson outline

  1. C# Overriding — What's Different?
  2. C# Requires `virtual` and `override`
  3. Extending with `base.Method()`
  4. Polymorphism in C#
  5. Polymorphism in Action: Live Demo
  6. UML: Shape Hierarchy
  7. Trace: Which Method Runs?
  8. Coding Practice: Shapes + Employees
  9. Lesson Summary
Unit bundleUnit 3B · Method Overriding and Polymorphism
Part of: Unit 3B · Method Overriding and Polymorphism: the whole unitEvery resource in the unit in one zip.

More from Unit 3B · Method Overriding and Polymorphism