Answer Posted / techy_unknown
Hi,
I think the question itself is illogical.
The term "overriding" is ONLY and ONLY associated with
methods/properties not to the class.
So, if the question is put a like, "How to prevent methods
not to be overriden?" then the answer is: "Make them non-
virtual."
And if the question is put a like, "How to prevent the
inheritance for a specific class?" then the answer
is, "Make the calss sealed."
I really hope that the reply makes sense here.
| Is This Answer Correct ? | 38 Yes | 1 No |
Post New Answer View All Answers
What is difference between array and collection in c#?
What is the use of parse in c#?
What is a sealed class?
List the different stages of a thread?
What is predicate builder?
How do I stop my console from closing in c#?
What does async mean in c#?
Can hashtable have duplicate keys?
What is web forms in c#?
What is application c#?
What do you mean by for each loop?
What is serialization in unity?
What is collection of classes in c#?
What is the solution if you need to manipulate sets of items?
What is the difference between continue and break statement?