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 the use of internal keyword?

934


When do you use virutal keyword?

940


What is an assembly and its use?

941


What is the importance of a Button control?

1264


Explain the advantages of vb.net?

894


Using VB, how can you change the Mouse Pointer?

1053


What is a stream in vb.net?

922


What is branching logic control in VB.NET?

923


what is interface and when it is used?

2219


Which dll is used for microsoft .net run time?

917


what is commom language runtime?

914


Describe about visual basic.net?

952


Explain about delegate?

835


What is jagged array in vb.net?

1034


Explain internal keyword in .net framework?

934