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

What are all the differences between dispose and finalize()?

553


List the two main parts of .net?

588


What is the significance of delegates. Where should they be used? What are the situations where we require them?

526


How can we store decimal data in .net?

530


Explain option explicit?

555






Explain the difference between int and int32?

520


thak you Mr Govind for replying to my question. My next question is that how to retrieve image stored in an SQL server table and assign it to any image control or picture control using VB.net

1701


Allowed program to auto-correct the database when loading a presentation.

1741


What languages does the .net framework support?

540


What do you mean by serialization?

532


described weak typing?

583


What is enumerator?

557


What is the difference between readonly variable and constant variable?

554


Which class allows an element to be accessed using unique key?

517


write a program to develop a graphic user interface application of marks book with students names and their names.the program should show the following options main menu,add student details,display student details,maximum mark and minimum mark.

1173