3 using System.Reflection;
5 public abstract class Foo<T> where T : class
11 public Foo<K> Hoge<K> () where K : class { return null; }
13 public static void Main ()
15 MethodInfo mi = typeof (Test).GetMethod ("Hoge");
16 foreach (Type t in mi.GetGenericArguments ())
17 if ((t.GenericParameterAttributes & GenericParameterAttributes.ReferenceTypeConstraint) == 0)
18 throw new Exception ();