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
Generate Function to Create Signed_Body for Instagram Project Description: I want the exact Signed_Body for Instagram The only difference is that I want the most recent ve

What is DISCO? DISCO is a method developed by Microsoft to publish and discover Web services. It discovers URLs of all XML Web services located on a Web server and develops a

What is the difference between thread and process? The thread is a path of execution which can run on CPU; a process is a collection of threads that share the same virtual memo

What is SIX sigma? The Sigma means the deviation in Greek language. The Deviation means how much variations exist in a set of data. For illustrate  let's say in a software main

Howto create a simple stylesheet for a web application

What is difference between data set and data reader? Some major differences between dataset and datareader are as folows :- 1) The DataReader gives forward-only and read-onl

Job Portal A one-stop explanation to all your needs. Consist of employee as well as employer login accounts. Employee capable to look for jobs. Employer capable to post jobs.

Web Service based application: Aims and Objectives Classics Online is a Web-based book and music retailer specialising in pre-1980s hardback

Project Description: We're seeking an IT candidate with experience to help us optimizely,  Skills required: .NET, C# Programming, ASP, eCommerce, SQL

What is a LinqDataSource control? The LinqDataSource control enables you to use LINQ. In an ASP.NET Web page by setting the properties in the markup text. You can use the contr