DynamicMethod with generic type parameters
问题 Is it possible to define a DynamicMethod with generic type parameters? The MethodBuilder class has the DefineGenericParameters method. Does the DynamicMethod have a counterpart? For example is it possible to create method with a signature like the one given blow using DynamicMethod? void T Foo<T>(T a1, int a2) 回答1: Actually there is a way, it's not exactly generic but you'll get the idea: public delegate T Foo<T>(T a1, int a2); public class Dynamic<T> { public static readonly Foo<T> Foo =