3 public class Gen
<A
,B
,C
> {}
6 static object GenericFunc
<A
,B
,C
> () {
7 return new Gen
<A
,B
,C
> ();
10 static void DoGenericStuff () {
11 Console
.WriteLine ("doing generic stuff");
12 GenericFunc
<object,object,object> ();
15 static void DoOtherGenericStuff () {
16 Console
.WriteLine ("doing other generic stuff");
17 GenericFunc
<object,object,int> ();
20 public static void Main ()
22 // Create an Application Domain:
23 System
.AppDomain newDomain
= System
.AppDomain
.CreateDomain("NewApplicationDomain");
25 // Load and execute an assembly:
26 newDomain
.ExecuteAssembly(@"generic-unloading-sub.2.exe");
30 // Unload the application domain:
31 System
.AppDomain
.Unload(newDomain
);
33 DoOtherGenericStuff ();