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 xamarin used for?
Is c# static or dynamic?
What is the use of the dispose method in C# ?
Which is executed if an exception has not occurred?
What are the properties of string?
What is the difference between interface and functional interface?
What is msil, and why should developers need an appreciation of it if at all?
What is multicast delegate explain with example?
update data in an xml file which resides in solution itself, using silverlight 4.0
Why do we need nullable types in c#?
what is a static constructor?
How to sign an assembly with strong name?
Define a strong name in .net?
Can we inherit private members of class in c#?
What is difference between a constant and read-only in C#?