Can you allow class to be inherited, but prevent the method
from being over-ridden?
Answers were Sorted based on User's Feedback
Answer / sujai cn
By using NEW key word with implementation of method (which
is declared as virtual in base class) in the derived class
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / mr.f
This problem is very easy, You just declared the method
without virtual keyword. :d
Is This Answer Correct ? | 5 Yes | 5 No |
Answer / nkm
Class can be MustInherit and method can be NotInheritable
(VB.NET Concept)
Is This Answer Correct ? | 0 Yes | 1 No |
What's difference between constants and static readonly?
what are some characteristics of an array?
Why static variables are used?
What are actions in c#?
What is a callback c#?
How do I count the length of a string in c#?
What is the difference between final finally and finalize in c#?
what is a destructor?
Can we inherit two classes in c#?
Why is dll used?
Which is algorithm is used to Manage the Memory in .net ??
What are the different types of literals in c#?