O'Reilly logo

Microsoft®C# Programming for the absolute beginner by Andy Harris

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

Improving an Existing Class

Most of the time, you don’t need to build an object completely from the ground up. Usually, your object can be based on another object. The ability to make one class based on another class is the foundation of inheritance. For example, imagine that you are a car designer, and you have defined a car factory that produces a standard car. If you want to build taxis and police cars, you don’t have to start from scratch because your new car can inherit all the basic characteristics (wheels, doors, engines) of its parent class, the standard car. To make a taxi class, you start with a car class and add the characteristics that make it a taxi (a horn that blows constantly and the capability to splash pedestrians are requisite ...

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