Overloading Derived Members

You can use the overloading technique described in Chapter 7 also within derived classes, with a few differences. You saw in Chapter 7 how overloaded members must not be marked with the Overloads keyword within a class. Instead in a derived class using the Overloads keyword is mandatory if you implement a new overload of a member with different signature. The following code provides an example of overloading the FullName method within the Contact class that you previously saw:

image

If another signature of the member is available within the derived class, the Overloads keyword is required; otherwise, the compiler throws a ...

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.