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 dynamic sql
What is a virtual property. Give an example?
What is console based application?
what is the fastest way to concatenate strings in c sharp?
Can you allow class to be inherited, but prevent the method from being over-ridden?
what does static void Main(string[] args) in C# mean????????
What is xor operation?
Does c# support try-catch-finally blocks?
How to add a readonly property in c#.net
What is a .aspx file?
How to create multi-dimensional array?
How do I declare a pure virtual function 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)