GenericTypeParameterBuilder [] typeParams = if_tb.DefineGenericParameters ("T");
MethodBuilder if_mb = if_tb.DefineMethod ("foo", MethodAttributes.Public|MethodAttributes.Abstract|MethodAttributes.Virtual, typeParams [0], Type.EmptyTypes);
+ MethodBuilder if_mb2 = if_tb.DefineMethod ("foo2", MethodAttributes.Public|MethodAttributes.Abstract|MethodAttributes.Virtual, typeParams [0], Type.EmptyTypes);
TypeBuilder tb = module.DefineType ("Foo`1", TypeAttributes.Public, typeof (object));
gen.Emit (OpCodes.Ret);
tb.DefineMethodOverride (mb, TypeBuilder.GetMethod (inst, if_mb));
+ tb.DefineMethodOverride (mb, TypeBuilder.GetMethod (inst, if_mb2));
var k = if_tb.CreateType ();
object obj = Activator.CreateInstance (t.MakeGenericType (new Type [] { typeof (string)}));
var info = k.MakeGenericType (new Type [] { typeof (string) }).GetMethod ("foo");
var res = info.Invoke (obj, null);
+
return res == null ? 0 : 1;
}
}