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

If you define a user defined data type by using the class keyword, is it a value type or reference type?

498


Name some properties of array.

482


What does firstordefault mean in c#?

474


What are the steps to create an assembly and add it to the gac?

460


What is difference between code access and role based security?

508






What is private void in c#?

520


What is poco c#?

485


Are c# generics the same as c++ templates?

495


Explanation on Generic?

552


What do you mean by winforms in c#?

503


What is the usage of transponders?

542


What is console programming language?

484


How to use delegates with events?

550


What is the difference between convert and parse in c#?

450


Which is better interface or abstract class in c#?

445