Polymorphism with Interfaces

An interface can be a variable's, parameter's or list's type, so it can hold objects of unrelated classes that keep the same contract. Depending on an interface, such as IClock, lets a test pass any fake that implements it.

Updated

Cheat sheet: Polymorphism with Interfaces
Category
C#
Level
Freelancer
Tags
c-sharp, Dependency Injection (oop), OOP, Polymorphism (c-sharp)