Hour 5. Inheritance, Interfaces, and Abstract Classes
In the last hour, you learned how classes in C# provide the language support required for object-oriented and component-oriented programming through encapsulation and abstraction. Although these aspects of object-oriented programming are important, they don’t provide a good mechanism for expressing a hierarchical relationship between specialized variations of a class.
Inheritance provides a natural way to express such relationships. Through inheritance, you can create a completely new class that inherits the characteristics and behaviors from its parents. Polymorphism, which ...
Get Sams Teach Yourself C# 5.0 in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.