Interviews9 answers
What is a singleton?
9 Answers
Refer http://dotnetmagic.blogspot.in/
Rajesh SinghPosted Dec 13, 2015, 5:44 AM EST
http://www.c-sharpcorner.com/code/1990/what-is-singleton-design-pattern.aspx
Rajesh SinghPosted Dec 4, 2015, 10:21 PM EST
This is helpful
http://www.dotnetperls.com/singleton
Hashim ShafiqPosted Aug 21, 2015, 6:52 PM EDT
Singleton is a design pattern that restricts the instantiation of a class to one object. We are achieving this through a static instance variable & private constructor. This is useful when exactly one object is needed to coordinate actions across the system.
Sujeet SumanPosted Jun 19, 2015, 4:18 AM EDT
single ton is a mechanism in which we can create a single instance(object) of class and this obj is used as a reference when we required another object of class
Rahul PrajapatPosted May 30, 2015, 5:21 PM EDT
single ton is a mechanism in which we can create a single instance(object) of class and this obj is used as a reference when we required another object of class
Pankaj Kumar ChoudharyPosted Mar 29, 2015, 4:17 AM EDT
http://www.dotnetperls.com/singleton
Munesh SharmaPosted Feb 13, 2015, 11:20 PM EST
singleton is a class which we can create only one instance.
Nitu SPosted Jan 20, 2015, 12:05 AM EST
A singleton is a design pattern used when only one instance of an object is created and shared; that is, it only allows one instance of itself to be created. Any attempt to create another instance simply returns a reference to the first one. Singleton classes are created by defining all class constructors as private. In addition, a private static member is created as the same type of the class, along with a public static member that returns an instance of the class. Here is a basic example:
public class SingletonExample {
private static SingletonExample _Instance;
private SingletonExample () { }
public static SingletonExample GetInstance() {
if (_Instance == null) {
_Instance = new SingletonExample ();
}
return _Instance;
}
}
Md. Raskinur RashidPosted Jan 11, 2015, 12:56 AM EST






