Exemple #1
0
        static void Main(string[] args)
        {
            TheBell s1 = TheBell.Instance();
            TheBell s2 = TheBell.Instance();

            Console.WriteLine(s1.GetHashCode());
            Console.WriteLine(s2.GetHashCode());

            Console.ReadKey();
        }
Exemple #2
0
        public static TheBell Instance()
        {
            if (bellConnection == null)
            {
                bellConnection = new TheBell();
            }


            return(bellConnection);
        }