Can you prevent your class from being inherited and becoming
a base class for some other classes?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many variables do you need?

490


What are jagged arrays used for?

476


Are arrays immutable c#?

511


How do you comment in c#?

492


What is ilasm.exe used for?

503






what are nullable types in c#

520


What is managed code?

532


What is connection pooling in ado.net?

535


Is there an equivalent of exit() for quitting a c# .net application?

486


Can you explain template pattern?

568


What is data type c#?

488


How many types of constructors are there in c#?

463


What is c# best for?

520


What is tpl in c#?

493


Describe ways of cleaning up objects in c#.

506