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 the use of internal keyword?
When do you use virutal keyword?
What is an assembly and its use?
What is the importance of a Button control?
Explain the advantages of vb.net?
Using VB, how can you change the Mouse Pointer?
What is a stream in vb.net?
What is branching logic control in VB.NET?
what is interface and when it is used?
Which dll is used for microsoft .net run time?
what is commom language runtime?
Describe about visual basic.net?
Explain about delegate?
What is jagged array in vb.net?
Explain internal keyword in .net framework?