Interview Questions

Which .Gang of Four. design pattern is shown below?

C# Interview Questions and Answers


(Continued from previous question...)

21. 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;

            }

        }

    }
  1. Factory
  2. Abstract Factory
  3. Singleton
  4. Builder

(Continued on next question...)

Other Interview Questions