Warnings cleanup
[mcs.git] / tests / gtest-226.cs
blob6c9d89afeedc63d81ff4683967d5676b64bc3a0e
1 using System;
2 using System.Reflection;
4 public struct Container<T>
6 public T content;
8 public Container (T content)
10 this.content = content;
14 public class A
16 public Container<long> field;
18 public A ()
20 field = new Container<long> (0xdeadbeaf);
24 public class M
26 public static int Main()
28 A a = new A();
30 if (a.field.content != 0xdeadbeaf)
31 return 1;
33 FieldInfo fi = a.GetType().GetField("field");
34 object o = fi.GetValue (a);
35 Container<long> unboxed = (Container<long>) o;
37 if (unboxed.content != 0xdeadbeaf)
38 return 2;
40 return 0;