eol
[mcs.git] / tests / gtest-anontype-11.cs
bloba3c7e505d45a194a71e10e4772198cfb5bd4cf32
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 private 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;