How can you prevent your class to be inherated further



How can you prevent your class to be inherated further..

Answer / 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

More Dot Net Framework Interview Questions

What are the contents of assembly?

2 Answers  


can i change web.config settings from iis?

1 Answers   HCL, ReadySoft, Wipro,


What is Globalizationa and Localization

1 Answers  


In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?

0 Answers  


Possible ways to prevent xss attacks on mvc application?

0 Answers  


How does .net framework works?

0 Answers  


Which .net framework is installed?

0 Answers  


What is viewstart page in mvc?

0 Answers  


Which is the default http method for an action method?

0 Answers  


WHICH IS THE BEST INSTITUTE FOR DOTNET REAL TIME PROJECT TRAINING

21 Answers   ABC, Cap Gemini, Comspark,


What is the difference between partial and renderpartial?

0 Answers  


What is the difference between the value-type variables and reference-type variables in terms of garbage collection ?

1 Answers  


Categories