Shadowing

The beginning of this chapter explained that classes can inherit from base classes exposed by class libraries such as .dll assemblies and that you do not necessarily need the source code. It can happen that you create a class deriving from another class exposed by a compiled assembly and implement a new member. It can also happen that the publisher of the compiled base class releases a new version of the class, providing a member with the same name of your custom member, but you cannot edit the base class, because you don’t have the source code. Visual Basic 2010 provides an interesting way for facing such a situation, known as shadowing. Although the Visual Basic compiler still enables compiling (it throws warning messages), basically ...

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.