CHAPTER 6 UNDERSTANDING INHERITANCE AND POLYMORPHISM
***** The Employee Class Hierarchy *****
Name: Chucky
ID: 92
Age: 50
Pay: 100300
SSN: 333-23-2322
Number of Stock Options: 9337
Name: Fran
ID: 93
Age: 43
Pay: 5000
SSN: 932-32-3232
Number of Sales: 31
Overriding Virtual Members Using the Visual Studio IDE
As you might have already noticed, when you are overriding a member, you must recall the type of each
and every parameter—not to mention the method name and parameter passing conventions (ref, out,
and params). Visual Studio has a very helpful feature that you can make use of when overriding a virtual
member. If you type the word “override” within the scope of a class type (then hit the spacebar),
IntelliSense will automatically display a list of all the overridable members defined in your parent
classes, as you see in Figure 6-5.
Figure 6-5. Quickly viewing overridable methods à la Visual Studio
231