What is shadowing?

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


Please Help Members By Posting Answers For Below Questions

How do you use two datareaders at the same time in a vb.net windows application ?

561


source code for how to login a vb.net application ?

599


Name and explain some of the exclusive features which are present in vb?

550


What is the maximum size of the textbox?

536


What is static member?

580






What is sorting in vb?

528


Explain how can we remove handlers at run time?

551


how many server control present in .net

2296


What is a static class?

600


Can you please explain the difference between value and reference types?

529


What is the differnce between managed code and unmanaged code?

543


What is code security?

528


What is the size of .net object?

590


Write the role of new keyword?

616


Explain strong name in .net assembly?

529