private static void TestGvmCallInIf <T>(GenBase <T> g, T p) { var i = 1; if (i == 1) { g.GMethod1(p, p); } }
private static void TestWithGenClass <T>(object o) { GenBase <T> b = o as GenBase <T>; var res = b.GMethod1 <int>(1, 2); WriteLineWithVerification(res, s_GMethod1); IFoo <string> ifoo1 = o as IFoo <string>; res = ifoo1.IMethod1 <int>(3, 4); WriteLineWithVerification(res, s_IFooString); IFoo <object> ifoo2 = o as IFoo <object>; res = ifoo2.IMethod1 <int>(5, 6); WriteLineWithVerification(res, s_IFooObject); IFoo <int> ifoo3 = o as IFoo <int>; res = ifoo3.IMethod1 <int>(7, 8); WriteLineWithVerification(res, s_IFooInt); }