Can you allow class to be inherited, but prevent the method
from being over-ridden?
Answers were Sorted based on User's Feedback
Answer / umesh
Yes, just leave the class public and make the method sealed.
| Is This Answer Correct ? | 17 Yes | 1 No |
Answer / anubhav gupta
We can use shadowing concept.
For shadowing use New keyword in derived class method.
Through this we can prevent the method from being over
ridden.
| Is This Answer Correct ? | 6 Yes | 3 No |
What is managed or unmanaged code?
What is datetime minvalue in c#?
In a single .NET DLL how many classes it contains?
What is the difference between ref & out parameters in c#?
How long does a loop recorder procedure take?
What statements can enclose a "continue" statement?
What are the Types of JIT and what is econo-JIT
How long will it take to learn c#?
Are enums static c#?
What are primitive data types in c#?
What is a static class in c#?
What is dictionary class in c#?
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)