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

Can struct be static in c#?

517


How do I create a delegate/multicastdelegate?

550


Explain briefly the difference between value type and reference type?

562


What is disconnected data architecture in c#?

487


Can main method be final?

476






What is extension method in c# and how to use them?

477


How can I access the registry from c# code?

518


What is dataset c#?

497


What is before string in c#?

499


What are the methods in c#?

531


What is property c#?

507


What does type safe mean in c#?

513


Explain get and set accessor properties?

494


What does return do in unity?

542


Write a C# program to find the Factorial of n

561