What is shadowing?

Answers were Sorted based on User's Feedback



What is shadowing?..

Answer / 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

What is shadowing?..

Answer / satya

Shadowing :- This is a VB.Net Concept by which you can
provide a new implementation for the base class member
without overriding the member. You can shadow a base class
member in the derived class by using the keyword Shadows .
The method signature access level and return type of the
shadowed member can be completely different than the base
class member.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What is a viewbag?

0 Answers  


Is asp.net still used?

0 Answers  


How can you provide an alternating color scheme in a Repeater control?

6 Answers   Siebel Systems,


7. Do you have reference list?

4 Answers   CMC, Hotel Jobs, Mannar Company, Qatar Petroleums, Swatz Oils,


What the use of Form Authentication and windows Authentication?

1 Answers   NetCity, TCS,






Define managed code and managed data in .net?

0 Answers  


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

0 Answers  


Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?

0 Answers  


Explain authorization levels in .net ?

0 Answers  


Is LINQ performance wise better or using sqlcommand?

1 Answers  


what is diffrence between debug class and trace class in asp.net ?

2 Answers  


Can we store PROGID information in database and dynamically load the component ?

1 Answers   Digital GlobalSoft, e4e,


Categories