Answer Posted / rohit
Whatever the code written by Sonia.sardana is shows the
shadowing concept but there is some print mistakes in the
code.The correct code is---
imports system
module m1
public class base
Public Sub test()
Console.WriteLine("sonia")
End Sub
Public Sub test(ByVal i As Integer)
Console.WriteLine(i)
End Sub
End Class
Public class derived
inherits base
Shadows Sub test(ByVal x As Integer)
Console.WriteLine("Shadow method")
End Sub
end class
Sub main()
Dim obj As New derived
obj.test() 'This will show error
obj.test(10) 'This is valid
End Sub
end module
Is This Answer Correct ? | 8 Yes | 6 No |
Post New Answer View All Answers
Write the role of new keyword?
What are the assembly entry points?
Define clr?
What is tracing?
What is break mode? What are the options to step through code?
Can you please explain the difference between dispose and finalize()?
How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently
What is the use of errorprovider control?
What languages does the .net framework support?
What is enumerator?
difference between checkbox vs radiobutton??
What is deep copy?
what is commom language runtime?
What is the role of new keyword?
what is difference between web.config and machine.config and where it will be ?