How to block a class from being inherited further?



How to block a class from being inherited further?..

Answer / Suresh Titiyal

To prevent a class from being inherited by other classes, you can declare it as `sealed`. When a class is sealed, it cannot be extended by deriving another class from it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

f i give input like 1,1,4,5,6,1,2,5,4,1,2, then output should be like : 1-4, 2-2, 4-2, 5-1, 6-1 which means 1 occurs 4 times, 2 occurs 2 times like so.

7 Answers  


What is asynccallback c#?

1 Answers  


What is windows application in c#?

1 Answers  


What are the access-specifiers available in c#?

26 Answers   Syntel,


Explain about ODP.net

1 Answers  


What does return do in unity?

1 Answers  


What is the Difference between imperative and interrogative code?

2 Answers   Wipro,


What is difference between dictionary and hashtable?

1 Answers  


What are delegates?

1 Answers   TCS,


What is a proxy of the server object in .NET Remoting?

1 Answers   BirlaSoft,


What is icollection in c#?

1 Answers  


What is the difference between an application domain and a process?

1 Answers  


Categories