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 the syntax to inherit from a class in c#?
Can abstract class have parameterized constructor?
What is difference between yielding and sleeping?
Is is possible to force garbage collector to run?
What is #region in c#?
What is singleordefault c#?
What is virtual in c#?
What are the 2 broad classifications of fields in c#?
What are value types in c#?
What is function c#?
What is Delegate and what is it used for ?
Is int a class in c#?
When do you generally use a class over a struct?
What is a Managed Code??
what is .NET framework architecture ??