Home C# Can you prevent your class from being inherited and becoming a base class for some other classes?
Can you prevent your class from being inherited and becoming a base class for some other classes? E-mail
User Rating: / 1
PoorBest 
Yes, that is what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It is the same concept as final class in Java.
Comments
Search
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 
 

Related links

Related Links:

Related Images

Related Links: