S
Striped
Is there any tool to convert source code, e.g. of a C# method, to opcodes being used in System.Reflection.Emit? It's a real pain to do that manually, especially for big pieces of code.
public static int Rule001() { return 1; }
==>
ILGenerator methodIL = ruleMethod.GetILGenerator();
methodIL.Emit(OpCodes.Ldc_I4, 1);
methodIL.Emit(OpCodes.Ret)
Thanks.
public static int Rule001() { return 1; }
==>
ILGenerator methodIL = ruleMethod.GetILGenerator();
methodIL.Emit(OpCodes.Ldc_I4, 1);
methodIL.Emit(OpCodes.Ret)
Thanks.