Go back and watch Quiz #9 if you haven't already.
An interface is a contract, an abstract class is shared base behavior plus required overrides — and a class can implement many interfaces but inherit from only one class. virtual + override means the runtime object decides which code runs, not the variable's declared type. new hides a method instead of overriding it, so the compile-time type of the reference decides instead. And injecting an interface instead of newing up a concrete class is what makes a controller loosely coupled, testable, and swappable.
#CSharp #DotNet #CodeLearning #AspNetCore #SoftwareEngineering