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
What is difference between metadata and manifest?
How to achieve Polymorphism in VB.Net?
what is intermediate language?
Is it necessary to have SQL server installed in your computer in order to create a service based database in vb.net?
Which is the base class for all the classes in .net framework?
What keyword is used to accept a variable number of parameter in a method?
What are different types of jit ?
Compare c# and visual basic.net?
What is a static variable?
Name and explain some of the exclusive features which are present in vb?
Explain private assembly?
What is the difference between Namespace and Assembly?
Write a VB.Net console program to check whether a number is perfect or not.
Explain the difference between thread and process?
What is visual basic.net culture?