Can you prevent your class from being inherited and becoming
a base class for some other classes?
Answer Posted / umesh
Yes, that?s 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?s the same concept as final class
in Java.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What is msil in c#?
What is the purpose of escape sequence?
What is string class in c#?
What is final keyword in c#?
What are the properties of string?
What is linq c#?
What is the execution entry point for a c# console application?
Can we inherit class that contains only one private constructor?
What are the uses of delegates in c#?
How do I unload an application domain?
What is difference between event and delegate in c#?
What is selector c#?
What is the difference between constants and read-only?
What is msil, and why should developers need an appreciation of it if at all?
What is difference between array and arraylist in c#?