Chapter 7: Poly-what-ism?

In This Chapter

check.png Deciding whether to hide or override a base class method (so many choices!)

check.png Building abstract classes — are you for real?

check.png Declaring a method and the class that contains it to be abstract

check.png Using ToString, the class business card

check.png Sealing a class from being subclassed

In inheritance, one class “adopts” the members of another. Thus I can create a class SavingsAccount that inherits data members such as account id and methods such as Deposit() from a base class BankAccount. That’s useful, but this definition of inheritance isn’t sufficient to mimic what’s going on out there in the business world.

tip.eps See Chapter 6 of this minibook if you don’t know (or remember) much about class inheritance.

A microwave oven is a type of oven, not because it looks like an oven but, rather, because it performs the same functions as an oven. A microwave oven may perform ...

Get C# 5.0 All-in-One For Dummies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.