How can i create only one instance of class and thus doesn't
allow creating any more instances?



How can i create only one instance of class and thus doesn't allow creating any more instances..

Answer / prayag thakkar

If a system only needs one instance of a class, and that
instance needs to be accessible in many different parts of
a system, you control both instantiation and access by
making that class a singleton.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Dot Net AllOther Interview Questions

how to use custom field validation

0 Answers   PCS, Prithvi,


Explain some of the disadvantages due to microsoft.net?

0 Answers  


Define pipelining? : Dot net architecture

0 Answers  


What are the major differences between services and web services?

0 Answers  


which class library is used to find unique key?

1 Answers  


what are constructors and destructors

1 Answers   Six Sigma,


When should you use Abstract Class vs Interface while programming? Give 1 Example

3 Answers   CSS Corp, Hexaware, T3 Softwares,


Can I create my own permission set?

0 Answers  


Explain dotnet framework ?

0 Answers  


What is .net transaction?

0 Answers  


What should one do to make class serializable?

1 Answers  


How to improve the cache performance? : .NET Architecture

0 Answers  


Categories