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 strongly typed in c#?

919


What are the 4 pillars of any object oriented programming language?

883


Can constructor be protected?

895


Is c# code is unmanaged or managed code?

1114


What is fcl in c#?

874


Explain the functionalities of satellite assembly?

957


Can a static class contain non static members?

992


Can we override interface method?

973


What does void mean unity?

949


Can the nested class access, the containing class. Give an example?

887


What is a Command Object in C#?

1032


What is the difference between throw and throw ex?

877


what is a destructor?

988


What are access modifiers in c#?

995


What is the difference between CONST and READONLY?

1071