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 / saurabh

In singleton pattern the constructor is not private but
protected.

Go for private constructor when your class has methods which
do not require object creation. ex. (Math class in c#).
Like If your class has all static method, you need not to
create an object in that case go for private constructor.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is asynccallback c#?

958


What are circular references?

889


Does c# have its own class library?

916


What is the diff between System.String and System.Text.StringBuilder classes?

956


Describe the process of “exception handling implementation” in c#?

913


What is executenonquery c#?

827


What is wcf c#?

896


What do you mean by stack and heap in c#?

862


What is type cast in C#?

952


What the different phase/steps of acquiring a proxy object in webservice?

921


Why is .net so popular?

903


How do I move from one form to another in c#?

835


How do I declare a pure virtual function in c#?

921


What is marshalling and what are different kinds of marshalling?

860


why delegate is type safe?

2955