4 // Check installed compiler
5 static void Generic<T> ()
7 // we use 'var' all around in the compiler sources
11 void DefaultParametersAvailable (int i = 3)
17 // Check installed mscorlib
18 // Type is included in Mono 2.4+, and .NET 3.5 SP1
19 object o = typeof (System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute);
21 // It should crash but double check it in case of very old old runtime
25 var consts = o.GetType ().Assembly.GetType ("Consts");
27 // We could be bootraping on cygwin using .net runtime
28 var assembly = o.GetType ().Assembly;
29 if (assembly.GetName ().Version >= new Version (4, 0) && assembly.Location.Contains ("Microsoft.NET"))
35 var field = consts.GetField ("MonoVersion");
40 if (!Version.TryParse (field.GetValue (null) as string, out version))
43 if (version < new Version (4, 0))