Interface Polymorphism: Create, Implement and Use (10/23)

Опубликовано: 27 Март 2026
на канале: rory mulcahey
317
5

In this video we will cover how to create and implement out our interface, as well as use an existing one.

Basic Steps:
Create a new Interface file
Build a new interface
Create a method with a return type of interface IEnumerable
Generate two new classes that implement the interface.
Use dependency inversion to send interface as a parameter.
Define argument instantiation, switching between both interfaces.

C# .NET
Windows Form Application
Visual Studio
Interface
Polymorphism
IEnumerable
List
Array
Dependency Inversion Principle (DIP)
Single Responsibility Principle (SRP)
Encapsulation
Loose coupling