Пример #1
0
        static void Main(string[] args)
        {
            ManicureRules inst1 = ManicureRules.Instance();
            ManicureRules inst2 = ManicureRules.Instance();

            Console.WriteLine(ReferenceEquals(inst1, inst2));
            inst1.SetManicureName("asdf");
            Console.WriteLine(inst1.GetManicureName());
        }
Пример #2
0
        public static ManicureRules Instance()
        {
            if (uniqueManicureRules == null)
            {
                uniqueManicureRules = new ManicureRules();
            }

            return(uniqueManicureRules);
        }