How can you prevent your class to be inherated further
Answer Posted / kirti
By setting Sealed - Key word
public sealed class Planet
{
//code goes here
}
class Moon:Planet
{
//Not allowed as base class is sealed
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is .net framework & its benefits?
How we can add the css in mvc?
Can you use Razor code in Javascript in ASP.Net MVC?
Difference between ASP.NET MVC and ASP.NET WebForms?
what is conceptual model?
How does servicing work for the .net framework 3.0?
What is viewbag title?
Which filter executes first in an asp.net mvc application?
What is ViewData and TempData in ASP.Net MVC?
What happens when I install the .net framework 3.0? How can I upgrade if I already have the .net framework 2.0 installed?
What is entity framework firstordefault?
What is a view engine?
mention what are the various methods provided by the dataset object to generate xml?
What is the difference between ViewData, ViewBag and TempData?
How to Create an Intranet Site Using ASP.NET MVC?