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 private assembly?
How to create a constant in vb.net?
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.
Compare c# and visual basic.net?
How to store decimal data in .net?
Explain about rapid application development tool?
List the different types of assembly?
what is the need for dynamic controls in vb.net? i would like to know for what purpose should we create the controls dynamically? please give the answer in simple words.
How a base class method is hidden?
Explain option explicit?
Explain about the feature anonymous type?
What is the ruby interface generator?
Can we use Vb.Net and C# language simultaneously in one .Net application?
What is a static variable?
Explain about the performance of visual basic?