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
how to sort an array in c#
Which is faster dictionary or list?
What is the base class of all classes in c#?
How does one compare strings in c#?
Why we use get and set property in c#?
Explain the different ways a method can be overloaded?
When should I throw an exception?
What is the difference between inheritance and abstract class?
What is the benefit of interface in c#?
What are c# types?
What do you know about WM_CHAR message?
Can an array be null c#?
Is string mutable in c#?
Explain the importance and use of each, version, culture and publickeytoken for an assembly.
What is difference between float and decimal?