Sealed Class:
A class which restricts inheritance for security region is called Sealed class.
Sealed class is the last class in hierarchy.
Sealed class can be a derived class but can't be a base class.
To access the members of sealed class we should create the instance object.
Advantages of sealed class is it restrict the third party vendor for developing new software by inheriting from our logic.
Private Class:
Classes and structs that are not nested within other
classes or structs can be either public or internal. A type
declared as public is accessible by any other type. A type
declared as internal is only accessible by types within the
same assembly. Classes and structs are declared as internal
by default unless the keyword public is added to the class
definition. And yes, a class cannot be private unless of
course if it a nested class.
Restricts the access to the class itself. Only methods that are part of the same class can access private members.
Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/
Naga116, if this helps please login to Mark As Answer. | Alert Moderator