Pages

Men

rh

10/19/2013

In Which scenario we will make a class as a Sealed in C#

  • If the Class is  Static.
  • If the Class contains inherited protected members with security - senefstive  information.
  • If the Class inherits many Virtual members.
  • If the Class is an attribute that requires fast searching using reflection. Sealing  an attribute improves reflection performance when retriveing the attribute.

No comments :

Post a Comment