Answers

Question and Answer:

  Home  C# (Sharp) Programming Language

⟩ 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.

 186 views

More Questions for you: