O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inheritance

Inheritance is a method for allowing one class to reuse the properties, methods, and events of another. The first class is called the parent, base, or super class. The class that inherits from the parent class is called the child class, derived class, or subclass. The act of making a new class that inherits from an existing class is called subclassing or deriving.

When one class inherits from another, the child class gains the benefits of the parent’s properties, methods, and events. (You can place restrictions on how a child class can inherit the parent’s members. You’ll learn more about that shortly.)

For example, suppose the Person class has FirstName, LastName, Street, City, State, and Zip properties, and you derive the Student

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required