netcoreapp1.0的.net框架EmitCalli有什么替代品吗
if (IntPtr.Size == 4)
il.Emit(OpCodes.Ldc_I4, ptr.ToInt32());
else if (IntPtr.Size == 8)
il.Emit(OpCodes.Ldc_I8, ptr.ToInt64());
il.EmitCalli(OpCodes.Calli, CallingConvention.Cdecl, returnType, paramTypes);
最佳答案
这个库包含你想要的吗?
https://www.nuget.org/packages/System.Reflection.Emit.ILGeneration/
它包含 System.Reflection.Emit.ILGenerator 类型,包括函数EmitCalli(OpCode opcode, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes)
关于c# - EmitCalli .net 核心替代品,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38129594/