CreateAndInject
CreateAndInject
  How about those `Unsafe.As`? Is also the same issue?
Do you mean we can use `MethodDef/MemberRef` rather than `MethodSpec` as operand of call instruction when the called method is generic method? If that, show a code to see how...
> For whatever reason, there is a MethodBase which declaring type that is instantiated but the method itself does not get instantiated. It also cannot be used as the call...
Yes, but your code import it as MethodDef/MemberRef
[DynamicTest.zip](https://github.com/0xd4d/dnlib/files/14759015/DynamicTest.zip) I made an example, your code import a generic method as MemberRef, old dnlib work fine: 
> It is not a valid dynamic method. If you invoke it, you will get "InvalidProgramException: Common Language Runtime detected an invalid program". In this case, it is inherently invalid...
Don't agree, `dnlib.DotNet.Emit.DynamicMethodBodyReader` is used to `decrypt` DynamicMethod's code, rather than `execute` a DynamicMethod, your code will cause `DynamicMethodBodyReader` no longer work.
Many protectors based on DynamicMethod will encrypt all methods like this, so how can we make unpacker for those? Do you think we must support correct generic types for all...
Since `DynamicMethodBodyReader` is designed as `Reader`, it contains a `RestoreMethod` rather than `ExecuteMethod`. dnlib is reverse lib, we use it to restore IL instructions rather than execute any code.
By the way, we can't use instantiated type for decryption purpose, otherwise DynamicMethodBodyReader will generate instantiated type also, eg: ```C# class My { public static void Test() { Activator.CreateInstance(); //...