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

Explain the role of Garbage collector and its generations?

516


What is an enumerator c#?

509


What is type safe in c#?

487


Which is faster list or dictionary in c#?

569


I was trying to use an out int parameter in one of my functions. How should I declare the variable that I am passing to it?

572






Which of these string definitions will prevent escaping on backslashes in c#?

567


How do you pronounce c#?

499


What is function and method in c#?

507


What is instantiating a class?

508


Why do we need indexers in c#?

472


Can you inherit multiple abstract classes in c#?

490


What is dataset and dataadapter in c#?

497


What is difference between managed and unmanaged code?

493


What does question mark mean in c#?

565


List the difference between interface and abstract class?

468