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 do you mean by winforms in c#?
How do you create multiple inheritance in C#?
5 Answers Infosys, KenIndia, Microsoft,
Explain get and set accessor properties?
What is the difference between var and dynamic types in c# 4.0?
What are nested classes in c#?
what is a constructor?
5 Answers Amazon, Amdocs, Choice Solutions,
Does c# support properties of array types?
Are c# destructors the same as c++ destructors?
What is overloading in c#?
Is it possible to implement an interface to a structure? Is it possible to extend a struct? Is it possible to inherit a class to struct?
9 Answers IBM, Logica CMG, TCS,
What is the difference between an XML "Fragment" and an XML "Document." ?
In a site to turn off cookies for one page which method is followed?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)