Can you prevent your class from being inherited and becoming
a base class for some other classes?
Answers were Sorted based on User's Feedback
Answer / umesh
Yes, that?s what keyword sealed in the class definition is
for. The developer trying to derive from your class will get
a message: cannot inherit from Sealed class
WhateverBaseClassName. It?s the same concept as final class
in Java.
| Is This Answer Correct ? | 12 Yes | 2 No |
Answer / neerajtyagi
You can prevent your class being derived using sealed
keyword.
But you can't use that class as base class once you make
that sealed.
Sealed and Derived both are opposite.
| Is This Answer Correct ? | 8 Yes | 0 No |
What is escape character in c#?
What are properties and indexer?
What are the two uses of a ‘using’ statement in c#?
What is the property of class?
In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method?
Explain what a diffgram, and a good use for one Define diffgram? How it be used?
Can you see a loop recorder?
What is the use of the static constructor? When static constructor gets compiled?
What is a protected class in c#?
Can abstract class be sealed in c#?
Helo , Help Me , Help Me About : C# Windows Application - Network How To Manage IP Client's Accessiblity To The Internet Share concise Substitute , Minor ISA Server
Why main method is static 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)