Answers

Question and Answer:

  Home  OOP

⟩ What can you do to make class available for inheritance but you need to prevent its method to come in inheritance chain?

Well, Declare a class with public access specifier and mark all it's method to sealed . As anything which is declared with sealed keyword cannot be inherited.

 199 views

More Questions for you: