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
What is the difference between delegate and events? Actually events use delegates in the bottom. But they also add an extra layer on the delegates, hence forming the publisher

Describe the three levels of data abstraction? The are three levels of abstraction: Physical level: The lowest level of abstraction explains how data are stored.  Logical

Full Time Coder My colleague is seeking for someone to work on his website via team viewer. First I would need scale following skills- a) C# - b) AJAX - c) LINQ to S

How can we add relation's between table in a DataSet? Dim objRelation As DataRelation  objRelation=New DataRelation("CustomerAddresses",objDataSet.Tables("Customer").Colu

Advertizing Project Description: I am preparing a MLM business. I can need direct mailing and coupon books as a product in my website. Skills required are .NET, C# Program

I have a responsive database structure and web template. I need someone to prepare the code (.net, jquery ) to make interaction with database . Insert, edit , save . Plus a custom

General Overview A number of organisations are using micro-blogging as a cost-effective way of communicating with customers, building online communities and releasing informatio

What are benefits and Limitation of using Viewstate for state management The benefits of using Viewstate are as follows:- 1)    There is no server resources required because

What is the namespace in which .NET have the data functionality classes? System.data : This namespace contains the basic objects used for accessing &  storing relational d

I want the iTunes producer GUI reproduced in ASP.NET MVC using c# / html / js. The part involved deals with creating album / track metadata. The data entered on the website form