How can you prevent classes to be inherited?

Answer Posted / nitin kumar tomar

just make the class sealed like

sealed public class classname

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the 3 types of properties in c# with an example?

543


What is list array in c#?

470


What is dictionary collection in c#?

495


what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?

1442


What is the symbol used for in c#?

493






What is satellite assembly? And steps to create satellite assembly?

513


What is a delegate? How can it works?

521


Is stringbuilder faster than string concatenation c#?

443


What does the keyword “virtual” declare for a method or property?

530


Explain the advantage of using system.text.stringbuilder over system.string?

463


How to add a readonly property in c#.net

492


Explain the types of comments in c#?

545


How can I get the ascii code for a character in c#?

565


How do you achieve polymorphism in c#?

503


What are concrete classes?

486