update readme (#21797)
[mono-project.git] / mcs / tests / gtest-anontype-11.cs
bloba0045f2dd51551d717bd9f96aa261d8c54490bd9
1 // Compiler options: -checked
3 using System;
5 internal sealed class Alpha
7 public Alpha (string value)
9 m_name = 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)
24 m_address = 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 ());
41 return 0;