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...

What is a private constructor? where will you use it?

Answer Posted / nevin jain

In singleton pattern we make the class sealed n keep
contractor as protected
......which is same as keeping class with any access
modifier with private constructor..

both pattern is the example of singleton pattern..
basically this pattern say that only single instance can be
created of the class which can be achieved either by private
constructor or sealed class with protected constructor..

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between il and dll ?

1013


Whats an assembly? Describe the importance of assembly?

910


What is lazy loading entity framework?

1014


What is difference between ienumerable and list?

983


What is a multicast c# delegate?

1097


Explain manifest & metadata in c#.

1012


What is iqueryable?

938


Explain static class members.

1065


What are satellite assemblies? How will you get the different language strings?

910


What exactly happens when we debug and build the program?

2423


What are the Types of caching

1016


What is the difference between var and dynamic types in c# 4.0?

1035


What is access modifier in c#?

899


Can we write class inside a class in c#?

973


Is c# still popular?

887