Can you allow class to be inherited, but prevent the method
from being over-ridden?

Answer Posted / umesh

Yes, just leave the class public and make the method sealed.

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a deadlock lock?

486


Explain about finalize method?

539


What benefit do you get from using a primary interop assembly (pia)?

505


Why do we use inheritance in c#?

475


Is nullable type c#?

483






Is cli same as the clr?

513


What is the difference between list and arraylist in c#?

409


List the difference between the virtual method and the abstract method?

482


Are tuples mutable c#?

486


Why do we need to serialize data?

497


What is better C# or VB.NET?

520


What is the difference between “dispose” and “finalize” variables in c#?

482


What is an escape sequence? Name some string escape sequences in c#.

511


Why do we need properties in c#?

487


In C#, explain the difference between overloading and overriding.

559