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

 Posted by Blessybaby on 1/6/2010 | Category: OOPS Interview questions | Views: 10632

Yes, that's 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's the same concept as final class in Java.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response