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

Singleton Design pattern?How do you achieve it?

Answer Posted / mithun kanungo

We Can Achieve Singleton Design Pattern By restricting Other
Class To Make Object of the class By Using Constructor
instead we can Use A Static Method to get hold of the
Instance of the class , And By making our Constructor
private we can Restrict other classes to make Instance of
the Class , So that All other Classes use the same static
method to make only one instance of the class.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between response.write() and response.output.write()?

1118


What is hidden field in asp.net?

1048


Difference between application events and session events

972


What is the difference between ASP Session State and ASP.Net Session State?

1028


What is the use of execute non query in asp.net?

925


What are resource file and how do we generate resource file?

933


Explain the different types of directives in .net?

889


Explain asp.net mvc request life cycle? : asp.net mvc

998


Is asp.net core faster?

979


Do gac'ed assemblies have fulltrust?

1033


If you want to write your own dot net language, what steps you will you take care?

1005


What is web api and why to use it?

1007


Where can I get the details on migration of existing projects using various technologies to asp.net?

1020


What is the size of Get method and how much data it can store?

1081


How you can manage the state of application at the server side in ASP.NET?

1028