What is shadowing
What is shadowing ?
When two elements in a program have same name, one of them can hide and shadow the
other one. So in such cases the element which shadowed the main element is referenced.
Below is a sample code, there are two classes “ClsParent” and “ClsShadowedParent”. In “ClsParent” there is a variable “x” which is a integer. “ClsShadowedParent” overrides “ClsParent” and shadows the “x” variable to a string
Public Class ClsParent Public x As Integer End Class Public Class ClsShadowedParent Inherits ClsParent Public Shadows x As String End Class
2007-10-23, 6497👍, 0💬
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all ...
What does a special set of tags <?= and ?> do in a PHP script page? <?= express...
How do we assign page specific attributes ? Page attributes are specified using the @Page directive.
What are the standard ways of parsing XML document? XML parser sits in between the XML document and ...
How can method defined in multiple base classes with same name be invoked from derived class simulta...