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 is the need for dynamic controls in vb.net? i would like to know for what purpose should we create the controls dynamically? please give the answer in simple words.
What is visual basic.net culture?
Write a VB.Net console program to check whether a number is perfect or not.
Explain how does the xmlserializer work?
Can you please explain the difference between thread and process?
What is the feature anonymous type?
Write a program to find all text files in a logical drive and return the count of the number of files?
What is the use of internal keyword?
What is sorting in vb?
What keyword is used to accept a variable number of parameter in a method?
Observations between vb.net and vc#.net?
What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?
Describe about visual basic.net?
What are the advantages of vb.net and c#?
What is late binding?