Search code examples
.netreflectioncilreflection.emit

Call and Callvirt


What is the difference between the CIL instructions "Call" and "Callvirt"?


Solution

  • call is for calling non-virtual, static, or superclass methods, i.e., the target of the call is not subject to overriding. callvirt is for calling virtual methods (so that if this is a subclass that overrides the method, the subclass version is called instead).