Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is shadowing?

Answer Posted / rohatash

there are overloaded methods in the base class, & u
marks one of the methods as shadows using the keyword
shadow in the derived class, then we cannot access the
overloaded methods.
Module Module1

Class A
Public Sub Show()
Console.WriteLine("Calling from A")
End Sub
End Class

Class B
Inherits A
Public Shadows Sub Show()
Console.WriteLine("Calling from B")
End Sub
End Class

Class C
Inherits B
Public Shadows Sub Show()
Console.WriteLine("Calling from C")
End Sub
End Class

Class Test
Public Shared Sub Main()
Dim x As A
x = New A()
x.Show()
x = New B()
x.Show()
x = New C()
x.Show()
End Sub
End Class

End Module

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between import system.data.sqlclient,system.data.oledb?

1029


What are the shared variables?

1052


what is difference between namespace and assembly?

1093


Explain cls?

1019


What is the use of errorprovider control?

1003


List the two main parts of .net?

1074


Explain about the feature anonymous type?

991


Name the tool which can convert visual basic old version to .net compatibility version?

1048


how to deploy vb.net with key and evaluation time? any one can help me?

2212


What are the advantages of an assembly?

1071


Why do we use byref keyword in vb.net?

1055


What are the differences between c# and visual basic.net?

1054


What is sorting in vb?

910


Explain about jagged arrarys ?

889


What do you mean by serialization and deserialization and it's use.

1053