Is il.EmitCall(OpCodes.Callvirt, getter, null);
the same as:
to il.Emit(OpCodes.Callvirt,getter);
I'm not sure how to examine the IL that is generated on the fly, so... this is the second related question.
Yes.
The source for Emit(OpCode, MethodInfo) begins with (after validation)
if (opcode.Equals(OpCodes.Call) || opcode.Equals(OpCodes.Callvirt) || opcode.Equals(OpCodes.Newobj))
{
EmitCall(opcode, meth, null);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With