If I want to override a method 1 of class A and in class b
then how do you declare ?

Answer Posted / avaneesh bajoria

If using VB.NET as the code behind, you use must override
instead of virtual and overrides in the derived classs

public class parent

public mustoverride sub walk()
messagebox.show("Parent")
end sub
end class

public class child
inherits parend

public overrides sub walk()
messagebox.show("Child")
end sub

end class

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does c# have functions?

467


What are Uses of CLR

535


How do you escape in c#?

506


How do I create a multi language, multi file assembly?

624


What is CASPOL?

609






Can a class be private in c#?

495


What is expression c#?

504


Why should I use interface in c#?

498


What is static void main in c#?

505


What is the difference between add and addrange in c#?

509


Explain inheritance in c#?

547


Illustrate serialization?

515


Difference between a sub and a function in c#.

541


How does return work in c#?

508


What is multicast delegate in c# ?

524