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
What are jagged arrays ?
Explain the use of new keyword?
Did vb6 support multi-threading ?
How would you implement inheritance using vb.net?
Explain the difference between web.config and machine.config and where it will be ?
What is the purpose of objects present in asp.net?
i have two class that contain's two methods as same name in derived class i have to call these two methods what will happen at run time ?
Can you please explain the difference between authentication and authorization?
Explain about the performance of visual basic?
What is the strong name in .net assembly?
what's ArrayList in .Net (VB.Net or C#).What's the advantageous using ArrayList.
So you know which dll is used for microsoft .net run time?
Explain manifest?
Name the class which allows an element to be accessed using unique key?
my project run very wel in my sytem yhen i am deploying my project on client machine ,after deployment i run my project then it show " can no find server name " what i do .