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
Is c# pass by reference?
What is pure abstract class in c#?
Is hashset serializable c#?
What is inumerable?
Classes and structs can be declared as static, is this statement true or false?
What is base class in c#?
What is difference between abstraction and encapsulation in c#?
Explain the security with aop?
Is c# different than c++?
What does console writeline do?
Can you specify nested classes as partial classes?
What is xor operator in c#?
Define an escape sequence, name few strings in escape sequence?
What are the value types in c#?
What is deferred execution in c#?