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 differnce between managed code and unmanaged code?
What is datatype conversion?
Name a feature which is common to all .net languages?
What is tracing?
Explain nested classes?
What are the advantages of migrating to vb.net?
What are the difference between structure and class?
What are the difference between dispose(), close(), exit(), end()?
Explain the difference between namespace and assembly?
Can you please explain the difference between vb and vb.net?
Write program in VB.Net with SQL Server and Crystal Reports to develop a small windows application to add,edit,save, search and print Employee Information and send sourcecode as zip file. empcode : .............. empname : .............. dateofjoin : dd/mm/yyyy dateofbirth : dd/mm/yyyy TableName: EmpMaster EmpCode EmpName DOB DOJ TableName: EmpDocs EmpCode DocNo DocName ExpDate
What is late binding?
Explain the difference between value and reference types?
What is option strict?
What is the difference between .dll extension and .exe extension files?