Can you prevent your class from being inherited and becoming
a base class for some other classes?

Answer Posted / pank

Make your class constructor as Private then it will restrict from being inherit as well as instantiate.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is private static in c#?

666


What is the use of 0 in c#?

717


How many bytes is an int c#?

671


Define an abstract class?

677


What is singleordefault c#?

689


What is difference between dll and exe in c#?

673


Is stringbuilder faster than string concatenation c#?

676


Is it possible to nest cfml conditional tags?

725


What is the difference between static class and singleton class in c#?

681


What do you mean by hashtable c#?

746


How a two-dimensional array declared in C#?

738


what is the purpose of using statement in c#

731


Are private members inherited in c#?

750


In which order the destructor is called for an inherited class?

715


Which is the base class in c#?

689