C#虚拟静态方法 [英] C# virtual static method

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

问题描述

为什么是静态的虚拟不可能的?是C#依赖或者只是没有于二OO世界上任何意义吗?

Why is static virtual impossible? Is C# dependent or just don't have any sense in the OO world?

我知道这个概念已经被强调,但我没有找到一个简单的答案以前问题。

I know the concept has already been underlined but I did not find a simple answer to the previous question.

推荐答案

虚拟指称为将在运行选择的方法-time,取决于动态对象的类型。 静态表示没有对象要调用的方法。

virtual means the method called will be chosen at run-time, depending on the dynamic type of the object. static means no object is necessary to call the method.

你怎么建议在同样的方法做两件事?

How do you propose to do both in the same method?

这篇关于C#虚拟静态方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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