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

How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.

1433


What is %20 in a url?

553


Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?

544


How to disable disable browser's Back button in asp.net (JavaScript)?

574


How use Xml data in ASP.net?

571






a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?

1604


Explain the path instructions in xaml?

575


Will the asp.net validators run in server side or client side? How do you do client-side validation in .net?

536


What is Pre-Render event in ASP.NET?

607


What are the media types of http requests and response?

519


Explain about consistent programming model in the .NET framework?

606


What is postback and autopostback in asp.net?

538


How to implement form based authentication in asp.net application?

579


What does asp stand for in asp.net?

533


Differentiate between globalization and localization.

550