Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to make a class non-inheritable other than sealed?

Answers were Sorted based on User's Feedback



How to make a class non-inheritable other than sealed?..

Answer / avinash

Use static class,static class make a class non inheritable

Is This Answer Correct ?    13 Yes 4 No

How to make a class non-inheritable other than sealed?..

Answer / divya

if we use private constructor we cant make an instance of the class, but still we can inherit it

Is This Answer Correct ?    13 Yes 5 No

How to make a class non-inheritable other than sealed?..

Answer / jj

A static class is basically the same as a non-static class,
but there is one difference: a ... Static classes are sealed
and therefore cannot be inherited.

Is This Answer Correct ?    9 Yes 1 No

How to make a class non-inheritable other than sealed?..

Answer / kishore.a

There are two ways:
1: Make the base class as static.
2: Declare a privete constructor in the base class.

Is This Answer Correct ?    8 Yes 2 No

How to make a class non-inheritable other than sealed?..

Answer / nitin

1)Make the class Sealed
2)Make the class staic
3)Have private constructor (Like in single ton class)

Is This Answer Correct ?    5 Yes 0 No

How to make a class non-inheritable other than sealed?..

Answer / chanchal rai

yes we have only one option to make none inheritable other than sealed.....we ll have to make the class Private.whenever we do use the Private keyword in the class for make it private than no any methods and class can inherit from that class

Is This Answer Correct ?    0 Yes 1 No

How to make a class non-inheritable other than sealed?..

Answer / adhithya

use private construtor inside the class.so that it cant be
inherited

Is This Answer Correct ?    4 Yes 10 No

Post New Answer

More C Sharp Interview Questions

What are object oriented concepts?

6 Answers   Adea, Microsoft,


How many dimensions can an array have?

0 Answers  


How do I download a program to my desktop?

0 Answers  


What are properties and indexer?

1 Answers   TCS,


Is c# an array?

0 Answers  


What is default access modifier for class in c#?

0 Answers  


How we convert private assembly into public assembly?

0 Answers   Wipro,


How many bytes is an int c#?

0 Answers  


What debugging tools come with the .NET ssSDK?

0 Answers   Siebel,


Does c# replace c++?

0 Answers  


How to implement singleton design pattern in c#?

0 Answers  


What is gui in c#?

0 Answers  


Categories