Programming in Any Language

C# OOP - Lessons


Inheritance

Click to enlarge

This is the first video exploring object-oriented programming. There are a number of topics to consider when exploring OOP. The first one we look at is Inheritance.

Inheritance, I believe, is easy to understand. If you build something, that something has certain properties – could be height, width, depth, color and many other things. Now, if you take that thing and build something new with it, that new thing contains all the properties of the first thing plus any new properties you might have added.

Example. You build a dog house. Four walls, a pitched roof and a door in the front wall. You call it “Dog House”. Now, suppose you make an identical dog house but add front porch for the dog to rest on. We’ll call that the “Luxury Dog House”. It has all the properties of the first dog house with the added property of a nice porch. That’s inheritance.

This video show you how we can extend classes using inheritance.

PDFs: Slides, Car Class, Vehicle Class, Form Code