Murach's C# - How to work with inheritance
This chapter shows you how inheritance is used throughout the .NET classes and
also how you can use inheritance in your own C# classes. When you're done, you'll
know how to create base and subclasses, how polymorphism works, and how to use casting
with inheritance. To make sure that you get all of that, this chapter presents a complete
application that uses a Product base class, Book and Software subclasses, and a ProductList
class that inherits the .NET ArrayList class. Wow!
|
|
|
|
How inheritance works |
400 |
|
How the .NET Framework uses inheritance |
402 |
|
Methods inherited from the System.Object
class |
404 |
|
How to use inheritance in your applications |
406 |
|
|
How to create a base class |
408 |
|
How to create a subclass |
410 |
|
How polymorphism works |
412 |
|
|
The operation of the Product Maintenance
application |
414 |
|
The code for the Product, Book, and
Software classes |
416 |
|
The code for the ProductList class |
418 |
|
The code for the Product Maintenance
form |
422 |
|
The code for the New Product form |
424 |
|
|
How to use the Type class to get information
about an object's type |
426 |
|
How to use casting with inheritance |
428 |
|
|
How to work with abstract classes |
430 |
|
How to work with sealed classes |
432 |
|
 |
|
|
|
|
© Copyright 1998-2008 Mike Murach &
Associates, Inc. All rights reserved.
|