In Scala, it is possible to have define a base class or trait(interface) sealed, so that the only classes which are allowed to extend that class must be placed in the same class.
This is a useful pattern when coding libraries, is there any equivalent in .NET?