Answer Posted / rishu
Sealed classes are used to restrict the inheritance feature of object oriented programming. Once a class is defined as sealed class, this class cannot be inherited.
In C#, the sealed modifier is used to define a class as sealed. In Visual Basic .NET, NotInheritable keyword serves the purpose of sealed. If a class is derived from a sealed class, compiler throws an error.
If you have ever noticed, structs are sealed. You cannot derive a class from a struct.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what are the Disadvantages of vb
Explain the difference between abstract class and interface.
What is the difference between delegates and events in c#?
Can a dictionary have duplicate keys c#?
How can we sort an array in c#?
What is the default value of object in c#?
What is wcf c#?
What is super class in c#?
Is a valid int value?
What is gac? What are the steps to create an assembly and add it to the gac?
How do I create a dbml file?
What are properties in C#?
Explain the difference between private and shared assembly?
What is null propagation c#?
What is the difference between an implicit conversion and an explicit conversion?