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
How do you use two datareaders at the same time in a vb.net windows application ?
source code for how to login a vb.net application ?
Name and explain some of the exclusive features which are present in vb?
What is the maximum size of the textbox?
What is static member?
What is sorting in vb?
Explain how can we remove handlers at run time?
how many server control present in .net
What is a static class?
Can you please explain the difference between value and reference types?
What is the differnce between managed code and unmanaged code?
What is code security?
What is the size of .net object?
Write the role of new keyword?
Explain strong name in .net assembly?