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


Please Help Members By Posting Answers For Below Questions

Constructor to an arbitrary base constructor?

557


What is the difference between paramaterized constructor and copy constructor?

505


What is anonymous methods in c#?

551


what are some characteristics of an array?

514


Is c# substring zero based?

497






Describe two uses of the “using” statement during the operation of c#?

545


what is inheritance and an example in vb.net and c# of when you might use it?

527


What are the problem with .NET generics?

547


What is reference types in c#?

471


How to sign an assembly with strong name?

575


Why main is static in c#?

522


What is overriding in c#?

492


What is dll hell, and how does .net solve it?

528


What is use of private class in c#?

503


How to find the current application file path while runtime?

495