public static int Main() { var b = new B(); if (b.Foo <int?> () == null) { return(0); } b.Foo2 <int?> (); var b2 = new B2(); b2.Foo <byte> (); var b3 = new B3(); b3.Foo <string> (); return(1); }