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
Which namespaces are necessary to create a localized application?
What is the reason behind the invention of c#?
why delegate is type safe?
How can you force derived classes to provide new method implementations for virtual methods?
What is a string in c#?
What is form feed and carriage return?
Is array passed by reference in c#?
How is lazy loading achieved?
How does inheritance work in c#?
What are the types of methods in c#?
Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?
How does substring work in c#?
How do you create partial methods?
What is gui in c#?
Is string mutable in c#?