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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access