How can we main a Class as base class,i.e not inherited
further?{please Dont tell using Sealed class,any other way}
Answers were Sorted based on User's Feedback
Answer / suman k dey
Instead of sealed we can use static class.
| Is This Answer Correct ? | 17 Yes | 3 No |
Answer / palash
Very Simple....
Create one private Constructor inside the class then we are
not create any object of that class.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / jay
final is an identifier valid in java, c# has sealed.
while its true that marking base CTOR as private makes
deriving from that class impossible, you SHOULD use sealed
for that purpose.
Reason is that "sealed" allows for some neat compiler
optimization.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / arun
using final keyword....i am not sure whether this works in
c# or not...
| Is This Answer Correct ? | 0 Yes | 4 No |
What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default
What is the use of flag in c#?
Define parsing?
Can you prevent a class from being instantiated?
What is 8 bit signed integer?
If u declare two interfaces withsame methodnmae .prototype how can u call the particular method from class?
What is a cshtml file?
What does the parameter Initial Catalog define inside Connection String?
What is difference between field and property in c#?
in object oriented programming, how would you describe encapsulation?
What is the difference between throw and throw ex?
An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?
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)