private static void T() { Dictionary <object, string> d = new Dictionary <object, string>(); ActiveState a = false; ActiveState b = true; ActiveState c = true; d[a] = "a"; d[b] = "b"; d[c] = "c"; Console.WriteLine(string.Format("a == a {0}", a == a)); Console.WriteLine(string.Format("a equals a {0}", a.Equals(a))); Console.WriteLine(string.Format("a == b {0}", a == b)); Console.WriteLine(string.Format("a equals b {0}", a.Equals(b))); Console.WriteLine(string.Format("c == b {0}", c == b)); Console.WriteLine(string.Format("c equals b {0}", c.Equals(b))); }