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

Answer Posted / guest

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 ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is reflection c#?

474


What are actions in c#?

489


What are the two kinds of properties in c#.

534


Why interface is required?

465


What is jagged array?

550






Can we extend static class in c#?

485


What is hierarchical inheritance in c#?

491


Explain About stateless and state full web service

572


What is the difference between firstordefault and first?

482


What is base class in c#?

544


What are floating point numbers?

496


What is the Signification of the "new " keyword in C#? example

529


How are Windows programs different from normal C-programs?

1680


Where static variables are stored?

480


What is predicate c#?

550