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
Explain how to store decimal data in .net?
What are the difference between dispose(), close(), exit(), end()?
What is the maximum size of the textbox?
What is the advantages of VB.NET?
What is the difference between convert.tostring and .tostring() method?
Is vb.net a programming language?
Explain about globalization?
Name some different types of control?
What is the difference between compiler and interpreter?
How would you implement inheritance using vb.net?
Explain the difference between system.string and system.stringbuilder classes?
What keyword is used to accept a variable number of parameter in a method?
Using VB, how can you change the Mouse Pointer?
What is sorting in vb?
Did vb6 support multi-threading ?