Wats the diff between sealed class and private class in
inheritance

Answer Posted / robert j

We can not put private,protected, internal protected over
the classes.. it is public by default...

The main purpose of putting "sealed" for the classes is to
prevent the other classes to refer it.It's functionality
can not be shared..

The important point is , "sealed" class can inherit from
any other non-sealed classes.. But no other classes can
inherit from a sealed class..

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if a static constructor throws an exception?

496


What are sessions in c#?

496


Is it possible to inline assembly or il in c# code?

529


Define method overloading in c#?

592


How can I process command-line arguments?

532






what are implementation inheritance and interface inheritance?

521


What sort algorithm does c# use?

515


How do I create a single-file assembly?

482


What is constants in c#?

426


What is xml serialization and deserialization in c#?

486


What is a generic class?

531


What is the property of class?

585


Describe the ways of cleaning up objects in c#.

523


What does .length do in c#?

527


What are primitive types in c#?

535