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 |
can we create an empty interface with no definitions? If so, how it should be called in the class?
what is the difference between the debug class and trace class?
List some of the common data providers for ado.net framework?
Ho we can see assembly information?
What is the difference between readkey and readline in c#?
How does substring work in c#?
What do you mean by sealed classes and static classes?
Example of value type and refarnce type
Difference between dispose and destructor?
What is dapper in c#?
List down the differences between “dispose” and “finalize” methods in c#.
How can you sort the elements of the array in descending order?
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)