.Net framework doesn't allow us to inherit a Sealed class.
I want to know how it restricts us to inherit a sealed class? I mean what is the difference between normal class and a sealed class because of which, we can't inherit sealed class?
e.g. I am ensuring that I am not going to inherit a class in my application and I am also assured that, nobody will use this class as a base class. Then is it makes any difference if I declare it as a sealed class?
Muhammad Fakhr Elden SamiPosted Feb 7, 2010, 4:01 PM
Muhammad Fakhr Elden SamiPosted Feb 7, 2010, 3:54 PM
srinathPosted Feb 6, 2010, 9:19 AM
Is sealed class is same as final in java??
please anyone give solution to my question.
Thanx in advance..
Mahesh ChandPosted Feb 6, 2010, 9:19 AM
This is probably a part of parser and lexical analyzer parts of C# Compiler.
That's what I think.
Jagjit PatilPosted Feb 6, 2010, 7:52 AM
But I wanted to know what happens under the hood when we declare any class as sealed, which prevents us inheriting it.
Do you have any idea?
Shrikanth HallikhedPosted Feb 6, 2010, 7:14 AM