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 difference between custom control and user control?
What is tracing?
Name some different types of control?
What is enumerator?
What do you mean by serialization?
What is the ruby interface generator?
Write program in VB.Net with SQL Server and Crystal Reports to develop a small windows application to add,edit,save, search and print Employee Information and send sourcecode as zip file. empcode : .............. empname : .............. dateofjoin : dd/mm/yyyy dateofbirth : dd/mm/yyyy TableName: EmpMaster EmpCode EmpName DOB DOJ TableName: EmpDocs EmpCode DocNo DocName ExpDate
What is the exact defination of object?
Explain how does the xmlserializer work?
How many languages are supported by .net?
what is difference between web.config and machine.config and where it will be ?
What is multiple form in vb?
Explain managed code?
What is the role of new keyword?
Explain nested classes?