What is shadowing?

Answer Posted / shalini

When two programming elements share the same name, one of
them can hide, or shadow, the other one. In such a
situation, the shadowed element is not available for
reference; instead, when your code uses the shared name,
the Visual Basic compiler resolves it to the shadowing
element.
Shadowing through inheritance is hiding a method of a
base class and providing a new implementation for the same.
This is the default when a derived class writes an
implementation of a method of base class which is not
declared as overridable in the base class. This also serves
the purpose of protecting an implementation of a new method
against subsequent addition of a method with the same name
in the base class.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between session and viewstate in asp.net?

606


What is the function of the ViewState property?

640


How can we use Web API with ASP.NET Web Form?

648


Can we set which type of comparison we want to perform by the CompareValidator control?

517


What are the advantages of using session?

436






Explain the asp.net mvc folder conventions? : asp.net mvc

506


What is difference between asp state management and asp.net state management? How can we pass info between 2 asp.net pages?

495


Briefly describe the role of global.asax?

578


What is difference between singleton and single call?

646


In how many ways we can retrieve table records count?

536


Explain asp.net page life cycle?

615


How does output caching work in ASP.NET?

502


What is the difference between ldap and active directory?

515


What are validator? Name the validation controls in asp.net? How do you disable them?

548


How do you remove duplicates without using remove duplicate stage?

617