Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / generic-unloading.2.cs
1 using System;
2
3 public class Gen<A,B,C> {}
4
5 public class main {
6     static object GenericFunc<A,B,C> () {
7         return new Gen<A,B,C> ();
8     }
9
10     static void DoGenericStuff () {
11         Console.WriteLine ("doing generic stuff");
12         GenericFunc<object,object,object> ();
13     }
14
15     static void DoOtherGenericStuff () {
16         Console.WriteLine ("doing other generic stuff");
17         GenericFunc<object,object,int> ();
18     }
19
20     public static void Main ()
21     {
22         // Create an Application Domain:
23         System.AppDomain newDomain = System.AppDomain.CreateDomain("NewApplicationDomain");
24
25         // Load and execute an assembly:
26         newDomain.ExecuteAssembly(@"generic-unloading-sub.2.exe");
27
28         DoGenericStuff ();
29
30         // Unload the application domain:
31         System.AppDomain.Unload(newDomain);
32
33         DoOtherGenericStuff ();
34     }
35 }