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 is the use of internal keyword?
What are nested classes?
Explain the use of serialization and deserialization?
Explain how to store decimal data in .net?
Explain strong name in .net assembly?
What is datatype conversion?
Explain nested classes?
Define naming convention?
Explain jit?
What is a stream in vb.net?
what is interface and when it is used?
Define serialization in .net?
What is late binding?
Explain cls?
Name some of the keywords used in vb.net?