Benefit of make the business layer class as sealed class
-
I set all my business layer classes as sealed class. I did like this because I read from somewhere that this will improve the performance. Is it true? Thanks and Regards, Hogan
-
I set all my business layer classes as sealed class. I did like this because I read from somewhere that this will improve the performance. Is it true? Thanks and Regards, Hogan
hogan.smith wrote:
I read from somewhere that this will improve the performance. Is it true?
I set the class as sealed class when I want to prevent derivation.. That's all. I never heard that the sealed class is better than the normal class..
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
hogan.smith wrote:
I read from somewhere that this will improve the performance. Is it true?
I set the class as sealed class when I want to prevent derivation.. That's all. I never heard that the sealed class is better than the normal class..
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
A sealed class cannot be used as a base class. For this reason, it cannot also be an abstract class. Sealed classes are primarily used to prevent derivation. Because they can never be used as a base class, some run-time optimizations can make calling sealed class members slightly faster. I copied the above sentance from MSDN 2005 Thanks, Hogan