codeowners update
[mono.git] / mcs / tests / gtest-226.cs
1 using System;
2 using System.Reflection;
3
4 public struct Container<T>
5 {
6         public T content;
7
8         public Container (T content)
9         {
10                 this.content = content;
11         }
12 }
13
14 public class A
15 {
16         public Container<long> field;
17
18         public A ()
19         {
20                 field = new Container<long> (0xdeadbeaf);
21         }
22 }
23
24 public class M
25 {
26         public static int Main()
27         {
28                 A a = new A();
29
30                 if (a.field.content != 0xdeadbeaf)
31                         return 1;
32
33                 FieldInfo fi = a.GetType().GetField("field");
34                 object o = fi.GetValue (a);
35                 Container<long> unboxed = (Container<long>) o;
36
37                 if (unboxed.content != 0xdeadbeaf)
38                         return 2;
39
40                 return 0;
41         }
42 }