Call 和 Callvirt [英] Call and Callvirt

查看:23
本文介绍了Call 和 Callvirt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CIL 指令Call"和Callvirt"有什么区别?

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

推荐答案

call 用于调用非虚拟、静态或超类方法,即调用的目标不受覆盖.callvirt 用于调用虚方法(因此,如果 this 是覆盖该方法的子类,则调用子类版本).

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).

这篇关于Call 和 Callvirt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆