Can you prevent your class from being inherited and becoming a base class for some other classes?

Yes, that is what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It is the same concept as final class in Java.

Showing Answers 1 - 3 of 3 Answers

sabir

  • Jan 6th, 2006
 

can be done by using the keyword "not inhertitable "syntax is not inheritable class '''''''''''''''codeend class

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions