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

Answers were Sorted based on User's Feedback



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

Answer / shantanu singh patel

Yes you can make it by using Sealed keyword.

No when your class in Sealed you cant inherit the class
then the question of base class for some other class is not
significant.

Thanks and Regards,
Shantanu

Is This Answer Correct ?    9 Yes 0 No

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

Answer / sharif

when a class is sealed it not possible to access the
members of the base call to the derived class?
wat happend when i use insted of sealed, am using the static

Is This Answer Correct ?    5 Yes 0 No

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

Answer / dhanunjaya

yes,By using a keyword called "sealed".a sealed class can
never be a base class for any class,it is the bottom most
class in a class hierarchy.......so it cant be be base
class further more....

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is the difference between disposing of () and finalize() methods in c#?

0 Answers  


Explain what is an interface in c#?

0 Answers  


In a single .NET DLL how many classes it contains?

0 Answers   Siebel,


What is access specifier in c#?

0 Answers  


Why ref is used in c#?

0 Answers  






Why do we Need of static class in c#?

0 Answers   NA,


Why do we need indexers in c#?

0 Answers  


What is xor operation?

0 Answers  


What does xpath return?

0 Answers  


Explain ACID rule of thumb for transactions.

1 Answers  


Explain the features of an abstract class in net.

0 Answers  


Practcle scenario where I can use abstract class and where I can use Interface

1 Answers   Jeevan Technologies,


Categories