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 are predicates in c#?

938


Explain what is the smallest unit of execution in .net?

939


What is the difference between list and ilist in c#?

880


What is connection pooling in ado.net?

941


Is static class thread safe in c#?

954


What are the Types of configuration files and their differences

1075


Can enum be null c#?

1011


Why does my windows application pop up a console window every time I run it?

979


What is static classes in c#?

1009


What is delimiter in c#?

902


What kind of the information stored inside the assembly?

1005


What is int parse in c#?

989


Is everything an object c#?

933


What are value types and reference types?

1134


Why linq is having select clause at the end?

916