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 property c#?
Is null c# operator?
How to find out that the code is written as managed or un-managed code?
Can you have an array of arrays?
What is a partial class in c#?
What do you mean by string objects are immutable?
Explain the difference between proc. Sent by val and by sub?
Could you explain the difference between func vs action vs predicate?
Does c# support parameterized properties?
What is Dependency of Injection?
Can an abstract class have a constructor c#?
List the fundamental oop concepts?
What is the symbol used for in c#?
Can you explain template pattern?
What is the compiler of c#?