[interp] disable assemblyresolve_event6.exe
[mono.git] / mono / tests / module-cctor-loader.2.cs
1 using System;
2
3 public class Program
4 {
5     public static int Main()
6     {
7         System.Reflection.Assembly asm = System.Reflection.Assembly.LoadFrom("module-cctor.exe");
8         Console.WriteLine("assembly loaded");
9         Type type = asm.GetType("NS.TestClass", true);
10         Console.WriteLine("got type 'NS.TestClass'");
11
12         System.Reflection.FieldInfo field = type.GetField("TestField");
13         Console.WriteLine("about to get value of 'TestField'");
14         Console.WriteLine("got field 'TestField'");
15         int val = (int)field.GetValue(null);
16         Console.WriteLine("Value of field: " + val);
17         if (val == 1)
18                 return 0;
19         return 1;
20     }
21 }
22
23