Private: Private
limits the visiblity to a scope
. Declaring a private class within a class means that
"sub-class" can't
be seen from outside of the class.
This is also true for methods and properties - they can be seen within the class, but not to any consumers or inheritors.
Private
keyword is used for declaring class.
Sealed: If a class is declared as sealed, that means that
you cannot inherit from the class
. Sealed class can be used when a class is internal to the operation of the library, class or whwn you donot want that class to be overridden because it may affect the functionality.
Sealed
keyword is used for declaring class
Pleae refer:
diff between sealed class and private class[
^]
difference between Sealed Class and Private Class[
^]