How can we main a Class as base class,i.e not inherited
further?{please Dont tell using Sealed class,any other way}

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define interface class in c#?

498


Can you explicitly call a destructor?

515


What does firstordefault mean in c#?

449


What does immutable mean in c#?

488


Explain the difference between access specifier and access modifier in c#?

474






What is 8 bit signed integer?

457


What is window application in c#?

482


Can an exception be thrown from a catch block?

553


Can a dictionary have duplicate keys c#?

455


What is event delegate in c#?

557


What is assembly version series sequence?

520


Is it possible to have different access modifiers on the get/set methods of a property?

489


What is Web.config?

530


Is constructor a static method?

463


Explain dataadapter.update method in .net?

496