 Hey everybody, this is Brian. If you're following along, this is video 21 in our tutorial for Visual Basic. Today we're going to be doing inheritance. And inheritance is kind of an advanced topic, but I'm going to walk you through it really quick because I think you can pick up on this pretty fast. So just go project, add class, and let's rename class one to mammal. And inside of the mammal class, we're just going to say public has hair, because mammals have hair as bullying equal true. And what else do mammals have? They have backbones, so we'll say public has backbone as bullying equal true. Now close your mammal class. Make another class and we're going to call this feline. And the feline class, what do cats tend to do? Well, let's say public has claws as bullying equal true. And let's just add subroutine in here, public sub, we'll say yes, console dot right line. And we'll say yes. Now just close that class and we're going to make another. This is the last one I promise. And we're going to say lion. And what do lions typically do? We'll see here. Public has, I hope if my keyboard has main, actually I think it spelled main as bullying equal true. It's going to be male lion. And we'll say public sub roar and console dot right line. And we're just going to make this thing roar. My daughter's probably laughing hysterically if she's watching this. Okay. So now we've got these three classes. We've got a mammal, a feline, a lion. Let's actually create an instance of the lion class here. So we'll say dim big cat as lion equal new lion. If you don't know what any of that means, go find video 20 out on YouTube and watch my class tutorial. Big cat dot has main and roar. You notice how it only has the properties of the lion. Well, let's say a lion is a feline and it is a mammal. So we want all those properties combined. How are we going to make that happen? Well, first off, let's jump into the feline class here. And I'm going to introduce you to what's called inherit. Just jump down a line and say inherits and give it the class name and felines are mammals. So a feline is going to inherit the properties of a mammal. And then go into the lion class and you guessed it. Inherits feline. Flip back to module one and this time go big cat dot and wow now suddenly it has backbone as claws has hair has main hisses and it roars. I'm not sure if lions actually hiss. I think they're big enough they don't need to hiss. But for the sake of argument, let's say this lion hisses. Anyways, you can see how it has all of the properties of a feline and a mammal combined. That's called inheritance. You can jump into the feline class and do me dot and you can see that it inherits backbone and hair and inherits these from the mammal class. But it also has its own properties. Has claws and hisses. Well we're currently in his so it would be very foolish of us to call that again. So as you can see the feline inherits from mammal. Lion inherits from feline so lion also inherits from mammals. So technically if you're kind of scratching your head it looks something like this. Now we can't do that in visual basic. That's an illegal function or it's an illegal argument but basically it goes from mammal feline lion. That is called inheritance and that my friends is probably about a two day course at a college and you just learned it in under five minutes. Pretty smart aren't ya? Well I hope you found this video educational and entertaining. Please send me your questions and comments and play around a little bit and if you get stuck go ahead and shoot me some source code. I'll try to help but I don't have a ton of time so thank you for watching.