IL Callvirt equivalence?

Is an il.EmitCall(OpCodes.Callvirt, getter, null);

is the same as:

to il.Emit(OpCodes.Callvirt,getter);

I'm not sure how to investigate IL that is generated on the fly, so ... this is the second related question.


source to share

1 answer


Source for Emit(OpCode, MethodInfo)

starts with (after verification)

if (opcode.Equals(OpCodes.Call) || opcode.Equals(OpCodes.Callvirt) || opcode.Equals(OpCodes.Newobj)) 
    EmitCall(opcode, meth, null); 




All Articles