Shadowing, DOT NET Programming

What is shadowing?

When 2 elements in a program have similar name, one of them can hide and shadow the one. Therefore in such cases the element which shadowed the main element is referenced. The sample code is below in which, there are two classes "ClsParent" and "ClsShadowedParent". In the "ClsParent" there is a variable "x" which is an integer. "ClsShadowedParent" overrides the "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

1574_shadowing.png

Figure:-Shadowing in Action

Posted Date: 9/22/2012 3:06:13 AM | Location : United States







Related Discussions:- Shadowing, Assignment Help, Ask Question on Shadowing, Get Answer, Expert's Help, Shadowing Discussions

Write discussion on Shadowing
Your posts are moderated
Related Questions

Ask question #Minimum 100 words accepWrite an ASP.NET program that allows you to create and populate a CheckBoxList control by accessing the Title field from the Movies database ta

What is the difference between thread and process?  Thread - is used to implement more than one program at a time. process - implements single program A thread is a path

Question: (a) List the two main advantages of developing a Multitiered Web Applications. (b) Explain how Validation controls are used to validate forms. (c) Using com

Asp.net expert and simple html I am not new to the industry. I am seeking a long term asp.net developer to build and maintain a volleyball player management website. We would

I need Job Posting Software for Schools Project Description: I want to create a software program that will automatically post a job to multiple schools. Let me know if you

How to implement DTC in .NET DTC is implemented using the COM+. Following are some of the steps to implement COM + in .NET:- 1) The "EnterpriseService" namespace has all

I want high skilled C++ programmers Project Description: I want to hire the developer, who are proficient in C/C++ and have experience with STL and work with the data structu

How can we get the state of the requested process? XMLHttpRequest get the current state of the request operation by using the readyState property. This property checks the cond

What is the use of DISPOSE method? This Dispose method belongs to the IDisposable interface. It is bad  to override the finalize method for writing the cleaning of the unmanage