S
Shawn
how do i prevent the second instance of my app from being instanced when one
is already running?
is already running?
Ravikanth said:Singleton assures that there is one and only one instance
of the class and provides a global point of access to
it.There are number of cases in programming where you
need to make sure that there can be one and only one
instance of a class e.g Window Manager,Print Spooler etc.
you can use a private constructor to prevent programmers
from creating instances of Singleton
Check out the following article:
http://www.dotnetextreme.com/code/SingletonCs.asp