Answer Posted / sonia.sardana
If there are overloaded methods in the base class, & u
marks one of the methods as shadows using the keyword
shadow in the derived class, then we cannot access the
overloaded methods.
Ex-
public class base
public sub test()
console.writeline("sonia")
end sub
public sub test(i as integer)
console.writeline(i)
end sub
end class
public sub derived
inherirts base
shadows sub test(x as integer)
console.writeline("Shadow method")
end sub
end class
sub main()
dim obj as new derived
obj.test()-->Invalid
obj.test(10)-->Valid
end sub
Is This Answer Correct ? | 22 Yes | 5 No |
Post New Answer View All Answers
What are the difference between dispose(), close(), exit(), end()?
What is the significance of delegates?
What is econo-jit?
What is jagged array in vb.net?
Explain about the keyword must inherit?
Define naming convention?
what is interface and when it is used?
What is the use of errorprovider control?
What are the advantages of vb.net and c#?
what is common language specification?
Explain cls?
Explain the difference between vb.net and c#, related to oops concepts?
What is the source code for display the picture in button click event?
Explain how does the xmlserializer work?
Write a program to find all text files in a logical drive and return the count of the number of files?