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

Which is the default http method for an action method?

0 Answers  


What are the sub types of ActionResult?

0 Answers  


What's the difference between Java and .NET garbage collectors ?

1 Answers   BirlaSoft,


What is page life cycle?

0 Answers  


What is the difference between string and String

1 Answers  






mention what is code first approach and model first approach in entity framework?

0 Answers   Microsoft,


Do I need microsoft .net framework?

0 Answers  


What is associationset? : Entity framework

0 Answers  


What are the types of assemblies

1 Answers  


What is edm (entity data model)? : Entity framework

0 Answers  


Why to use html.partial in mvc?

0 Answers  


What's an interface

1 Answers  


Categories