Join Gerry O'Brien for an in-depth discussion in this video Using inheritance, part of Learning C# (2014).
What is considered to be the second pillar…of object-oriented programming is a concept known as inheritance.…When we think about inheritance, we can take a look…at how we relate to our parents and our grandparents.…If we think about the color of our eyes and the color of our…hair, perhaps our height and some of our mannerisms, a lot of people will…say, oh, you have your mother's eyes, or you have your father's temper, and…these are examples of attributes or traits that you have inherited from your parents.…Likewise, you can inherit some of those attributes and traits from your…grandparents and then from your great-grandparents,…all the way up this hierarchy chain.…
Within object-oriented programming, we can do the same thing.…We can create inheritance hierarchies of the classes that we have, where a…subclass becomes a sub or a child, if you will, of a parent class.…And we can use our example of the Animal class that we have here as a base class.…And again, this is the same functionality that…we've been using in our classes throughout the course.…
- Installing C#
- Working with loops
- Controlling program flow
- Using variables
- Building functions
- Creating and instantiating classes
- Catching errors
- Managing resources with the garbage collector
- Building collections
Skill Level Beginner
1. Introducing C#
2. C# Language Elements
3. Object-Oriented Programming in C#
4. Structured Exception Handling
5. Resource Management in C#
6. Extensible Types in C#
7. Windows Apps in C#
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.