2 using System.Reflection;
6 public static int Main ()
8 var t = Type.GetType("Mono.Runtime");
11 var setGCAllowSynchronousMajor = (Func<bool,bool>) Delegate.CreateDelegate(typeof(Func<bool,bool>),
13 "SetGCAllowSynchronousMajor",
15 throwOnBindFailure:false);
16 if (setGCAllowSynchronousMajor == null)
19 if (!setGCAllowSynchronousMajor (false))
20 Console.WriteLine ("could not disable synchronous major");
21 if (!setGCAllowSynchronousMajor (true))