Using Inheritance in C#

With object-oriented design and programming, you design and build your applications by discovering (through analysis and design) and then implementing the key abstractions in the problem domain as well as implementing (or buying) key-implementation abstractions, such as collections, GUI classes, and so forth. One of the key pillars of object orientation is inheritance. Inheritance is how you express an “is-a” relationship between two abstractions (classes). In other words, inheritance is how you model and implement a relationship where two or more types are generalizations/specializations of each other. For instance, if you are building a payroll application, you would likely need an Employee class to model the employees ...

Get .NET and COM Interoperability Handbook, The 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.