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
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
Is c sharp and c# are same?
What is the compiler of c#?
What is difference between first and firstordefault?
Describe the ways of cleaning up objects in c#.
what are windows services?
Give an example of a ctype.
What is or operator in c#?
What are value types and reference types?
What is the use of xmlserializer?
What is the difference between method and function in c#?
Why to use lock statement in c#?
What is boolean conditions in c#?
What is an enumerator c#?
Is there a way to force garbage collection?