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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain hard disk? : Dot net architecture

784


How cache is used? : Dot net architecture

714


What are the important principles of soa (service oriented architecture)?

696


Explain .net mobile automatic paging? : Microsoft dot net mobile

698


Explain 'managed' mean in the .NET context

901


Define domestic architecture artifacts? : Dot net architecture

718


What is the purpose of hard disk? : Dot net architecture

723


What are the types of application software?

729


What re interop services?

784


Explain pipelining? : Dot net architecture

773


When do I need to use gc.keepalive?

858


8. Oop-Why and were we use Interfacse and Abstract class.

1831


What is the difference between .net mobile pages and ordinary .net web page? : Microsoft dot net mobile

732


Define cache coherency? : Dot net architecture

766


Explain How to improve the cache performance? : Dot net architecture

724