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
How do you script this scenario in QTP using VB? Verify XML attributes in XML message against XSD and data mapping of fields to Oracle tables? Verify data in XML to data in a defined table?
Explain the difference between import system.data.sqlclient and system.data.oledb?
What is the difference between convert.tostring and .tostring() method?
Name the class which allows an element to be accessed using unique key?
What are all the parts of .net framework?
what is difference between web.config and machine.config and where it will be ?
Described strong typing
Explain internal keyword in .net framework?
What is the main use of a namespace?
Did vb6 support multi-threading ?
What is code access security?
How many classes a dll can contain?
Explain manifest?
What is the difference between convert.tostring and i.tostring method?
what is common type system?