File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,20 @@ namespace Singleton {
22 class Singleton {
33 // A variable which stores the singleton object. Intially,
44 // the variable acts like a placeholder
5- private static __singleton : Singleton = null ;
5+ private static singleton : Singleton = null ;
66 // private constructor so that no instance is created
77 private constructor ( ) {
88 }
99 // This is how we create a singleton object
1010 public static getInstance ( ) : Singleton {
1111 // check if an instance of the class is already created
12- if ( this . __singleton == null ) {
12+ if ( this . singleton == null ) {
1313 // If not created create an instance of the class
1414 // store the instance in the variable
15- this . __singleton = new Singleton ( ) ;
15+ this . singleton = new Singleton ( ) ;
1616 }
1717 // return the singleton object
18- return this . __singleton
18+ return this . singleton
1919 }
2020 }
2121}
You can’t perform that action at this time.
0 commit comments