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 platform independence"?
What floating point types is supported in C#?
How is exception handling implemented in c#?
What is the implicit name and type of the parameter that gets passed into the class set method?
When a switch is said to be congested?
What is sqlconnection in c#?
What is a cshtml file?
What's the c# syntax to catch any possible exception?
What is join in c#?
Does c# support #define for defining global constants?
What is garbage collection? How to force garbage collector to run?
Can an abstract class inherit from another abstract class c#?
Define a jagged array in c#?
How do you mark a method obsolete?
What is a generic in c#?