static void Main(string[] args) { TheBell s1 = TheBell.Instance(); TheBell s2 = TheBell.Instance(); Console.WriteLine(s1.GetHashCode()); Console.WriteLine(s2.GetHashCode()); Console.ReadKey(); }
public static TheBell Instance() { if (bellConnection == null) { bellConnection = new TheBell(); } return(bellConnection); }