10 public void Foo<T> (IFoo<T> t) where T : class
16 public void Foo2<T> (IFoo<T> t)
22 class C2<T> where T : class
35 static void Test<T>(Func<T> func) where T : struct
37 var r = func?.Invoke ();
40 static void Test2<T>(Func<T> func)
47 new C1 ().Foo<Program> (null);
48 new C1 ().Foo2<Program> (null);
50 new C2<string> ().Foo ();