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

Why we use oops in c#?

732


What is callback in c#?

638


How to declares a two-dimensional array in C#?

770


Suppose you have already existing application with Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. With this example how can you approach migrating this application to .NET?

675


How does c# generics and c++ templates compare?

645






Can c# inherit multiple classes?

695


What are the Types of configuration files and their differences

741


What is encapsulation in csharp?

688


What is generic types in c#?

658


What is the namespace for datatable in c#?

696


What is difference between var dynamic and object in c#?

669


Why do we use namespace in c#?

684


What does == mean in c sharp?

682


Why do we need static class in c#?

726


What is hashset c#?

662