Chapter 17 Working with VB .NET


Shadows

Shadows indicates that an inherited element hides a parent element with the same name. To design a shadows class or interface, you have to set the class or interface Shadows extended attribute to True.

In the following example, class DialogBox inherits from class Window. Class Window contains an inner classifier Control, and so does class DialogBox. You do not want class DialogBox to inherit from the control defined in Window, to do so, you have to set the Shadows extended attribute to True, in the Control class inner to DialogBox:


...
Public Class DialogBox
   Inherits Window
   Public Shadows Class Control
   End Class
End Class
...

 


Copyright (C) 2006. Sybase Inc. All rights reserved.