Can you allow class to be inherited, but prevent the method
from being over-ridden?
Answer Posted / anubhav gupta
We can use shadowing concept.
For shadowing use New keyword in derived class method.
Through this we can prevent the method from being over
ridden.
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What are properties in c#. Explain with an example?
What is a protected class c#?
Which attribute is used in order that the method can be used as webservice?
What is array c#?
What is polymorphism and its types in c#?
What is difference between C# and VB.NET?
Can abstract classes be final?
Can we have multiple constructors in a class c#?
What are functions c#?
What is an argument in c#?
What is static void main in c#?
What is the difference between C# 3.5 and C# 4.0?
Is array a collection c#?
How to exclude a property from xml serialization?
What is use of singleton class in c#?