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
Why do we use static class in c#?
What is the purpose of abstract class in c#?
What is Implicit conversion in C#?
What is a clr (common language runtime)?
What is the difference between structure and class in c#?
How does aspect oriented programming work?
how dot net compiled code will become platform independent?
Explain the Abstract class in c#.net
Can a string be null c#?
Give an example to show for hiding base class methods?
What is xor operator in c#?
Define satellite assembly in c#?
Which string method is used for concatenation of two strings in c#?
Illustrate serialization?
Why do we use stringbuilder in c#?