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. You could create a class deriving from another class exposed by a compiled assembly and implement a new member. In addition, the publisher of the compiled base class could release a new version of the class, providing a member with the same name of your custom member. In this case, you would not be able to edit the base class because you wouldn’t have the source code. Visual Basic 2015 provides an interesting way of dealing with such a situation known as shadowing. Although the Visual Basic compiler still enables compiling (it reports warning messages), ...

Get Visual Basic 2015 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.