C# supports two broad categories of polymorphism: Static (Compile Time), and Dynamic (Runtime). In this video I explain static and dynamic polymorphism and demonstrate how to achieve polymorphic behavior in your code.
I also cover the SOLID design principles:
Single-Responsibility Principle
Open-Closed Principle
Liskov Substitution Principle
Interface Segregation Principle
Dependency-Inversion Principle
The material discussed in this video comes from my book: C# For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming, 2nd Edition:
https://www.pulpfreepress.com/csharp-...
GitHub Repo:
https://github.com/pulpfreepress/poly...
Index:
Intro: 00:16
Kinds of Polymorphism C# Supports: 00:43
Purpose of Types: 01:13
Dynamic Polymorphism Section: 03:00
SOLID Design Principles: 04:49
Fleet Simulation Architecture: 05:41
Fleet Simulation Code Demo: 08:53
Person-Employee Architecture: 22:35
Person-Employee Code Demo: 26:00
Static Polymorphism Section: 38:02
Operator Overloading: 38:07
Method Overloading: 38:43
Generics: 39:07
Static Polymorphism Code Demo: 41:06