↑ Grab this Headline Animator

Friday, October 3, 2008

What are Sealed Classes and methods?

A sealed class cannot be used as a base class.

Because they can never be used as a base class, some run-time optimizations can make calling sealed class members slightly faster.

For this reason, it cannot also be an abstract class.

Sealed methods can not be overridden.

A class member, method, field, property, or event, on a derived class that is overriding a virtual member of the base class can declare that member as sealed.

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.


Latest Articles