1 // Compiler options: -checked
5 internal sealed class Alpha
7 public Alpha (string value)
12 public override int GetHashCode ()
14 return int.MaxValue
& m_name
.GetHashCode ();
17 private string m_name
;
20 internal sealed class Beta
22 public Beta (string value)
27 public override int GetHashCode ()
29 return int.MaxValue
& m_address
.GetHashCode ();
32 private string m_address
;
35 internal static class Program
37 public static int Main ()
39 var a
= new { First = new Alpha ("joe bob"), Second = new Beta ("main street") }
;
40 Console
.WriteLine ("hash = {0}", a
.GetHashCode ());