Which Gang of Four design pattern is shown below?
public class A
{
private A instance;
private A()
{
}
public static A Instance
{
get
{
if ( A == null )
A = new A();
return instance;
}
}
}
Options
- Factory
- Abstract Factory
- Singleton
- Builder
CORRECT ANSWER : Singleton
Write your comments